update to Firefox 29.0b7
authorWolfgang Rosenauer <wr@rosenauer.org>
Mon, 14 Apr 2014 09:09:11 +0200
changeset 716 cef565f1c325
parent 715 e1c226a4de34
child 717 c18c0e8dbac7
child 718 6cb1ac7cd223
update to Firefox 29.0b7
MozillaFirefox/MozillaFirefox.changes
MozillaFirefox/MozillaFirefox.spec
MozillaFirefox/create-tar.sh
MozillaFirefox/mozilla-aarch64-599882cfb998.diff
MozillaFirefox/mozilla-aarch64-bmo-963028.patch
MozillaFirefox/mozilla-aarch64-bmo-963029.patch
MozillaFirefox/mozilla-aarch64-bmo-963030.patch
MozillaFirefox/mozilla-aarch64-bmo-963031.patch
MozillaFirefox/mozilla-icu-strncat.patch
firefox-kde.patch
firefox-no-default-ualocale.patch
mozilla-aarch64-599882cfb998.diff
mozilla-aarch64-bmo-963028.patch
mozilla-aarch64-bmo-963029.patch
mozilla-aarch64-bmo-963030.patch
mozilla-aarch64-bmo-963031.patch
mozilla-icu-strncat.patch
mozilla-idldir.patch
mozilla-kde.patch
mozilla-ppc64le-mfbt.patch
mozilla-shared-nss-db.patch
series
toolkit-download-folder.patch
--- a/MozillaFirefox/MozillaFirefox.changes	Sun Apr 13 16:54:09 2014 +0200
+++ b/MozillaFirefox/MozillaFirefox.changes	Mon Apr 14 09:09:11 2014 +0200
@@ -1,4 +1,16 @@
 -------------------------------------------------------------------
+Sun Apr 13 15:34:58 UTC 2014 - wr@rosenauer.org
+
+- update to Firefox 29beta7
+  * rebased patches
+  * removed obsolete patches
+- requires NSS 3.16
+- patches disabled temporarily (TODO)
+  * mozilla-ppc64le-build.patch
+  * firefox-browser-css.patch
+- added mozilla-icu-strncat.patch to fix post build checks
+
+-------------------------------------------------------------------
 Mon Apr  7 15:34:31 UTC 2014 - dmueller@suse.com
 
 - add mozilla-aarch64-599882cfb998.patch,
--- a/MozillaFirefox/MozillaFirefox.spec	Sun Apr 13 16:54:09 2014 +0200
+++ b/MozillaFirefox/MozillaFirefox.spec	Mon Apr 14 09:09:11 2014 +0200
@@ -18,8 +18,8 @@
 
 
 %define major 28
-%define mainver %major.0
-%define update_channel release
+%define mainver %major.99
+%define update_channel beta
 
 %if %suse_version > 1220
 %define gstreamer_ver 0.10
@@ -37,6 +37,7 @@
 BuildRequires:  libgnomeui-devel
 BuildRequires:  libidl-devel
 BuildRequires:  libnotify-devel
+BuildRequires:  makeinfo
 BuildRequires:  python
 BuildRequires:  startup-notification-devel
 BuildRequires:  unzip
@@ -51,7 +52,7 @@
 BuildRequires:  wireless-tools
 %endif
 BuildRequires:  mozilla-nspr-devel >= 4.10.3
-BuildRequires:  mozilla-nss-devel >= 3.15.5
+BuildRequires:  mozilla-nss-devel >= 3.16
 BuildRequires:  nss-shared-helper-devel
 BuildRequires:  pkgconfig(libpulse)
 %if %suse_version > 1210
@@ -64,7 +65,7 @@
 %endif
 Version:        %{mainver}
 Release:        0
-%define         releasedate 2014031500
+%define         releasedate 2014041300
 Provides:       firefox = %{mainver}
 Provides:       firefox = %{version}-%{release}
 Provides:       web_browser
@@ -103,6 +104,7 @@
 Patch8:         mozilla-ntlm-full-path.patch
 Patch9:         mozilla-repo.patch
 Patch10:        mozilla-sle11.patch
+Patch11:        mozilla-icu-strncat.patch
 Patch12:        mozilla-arm-disable-edsp.patch
 Patch13:        mozilla-ppc.patch
 Patch14:        mozilla-libproxy-compat.patch
@@ -114,16 +116,11 @@
 Patch20:        mozilla-ppc64le-xpcom.patch
 Patch21:        mozilla-ppc64-xpcom.patch
 # Gecko/Toolkit AArch64 Porting
-Patch36:        mozilla-aarch64-599882cfb998.diff
-Patch37:        mozilla-aarch64-bmo-810631.patch
-Patch38:        mozilla-aarch64-bmo-962488.patch
-Patch39:        mozilla-aarch64-bmo-963030.patch
-Patch40:        mozilla-aarch64-bmo-963027.patch
-Patch41:        mozilla-aarch64-bmo-963028.patch
-Patch42:        mozilla-aarch64-bmo-963029.patch
-Patch43:        mozilla-aarch64-bmo-963023.patch
-Patch44:        mozilla-aarch64-bmo-963024.patch
-Patch45:        mozilla-aarch64-bmo-963031.patch
+Patch30:        mozilla-aarch64-bmo-810631.patch
+Patch31:        mozilla-aarch64-bmo-962488.patch
+Patch32:        mozilla-aarch64-bmo-963027.patch
+Patch33:        mozilla-aarch64-bmo-963023.patch
+Patch34:        mozilla-aarch64-bmo-963024.patch
 
 # Firefox/browser
 Patch100:       firefox-browser-css.patch
@@ -261,29 +258,25 @@
 %if %suse_version < 1120
 %patch10 -p1
 %endif
+%patch11 -p1
 %patch12 -p1
 %patch13 -p1
 %patch14 -p1
-%patch15 -p1
+#%patch15 -p1
 %patch16 -p1
 %patch17 -p1
 %patch18 -p1
 %patch19 -p1
 %patch20 -p1
 %patch21 -p1
-%patch36 -p1
-%patch37 -p1
-%patch38 -p1
-%patch39 -p1
-%patch40 -p1
-%patch41 -p1
-%patch42 -p1
-%patch43 -p1
-%patch44 -p1
-%patch45 -p1
+%patch30 -p1
+%patch31 -p1
+%patch32 -p1
+%patch33 -p1
+%patch34 -p1
 
 # Firefox
-%patch100 -p1
+#%patch100 -p1
 %patch101 -p1
 %if %suse_version >= 1140
 %patch102 -p1
--- a/MozillaFirefox/create-tar.sh	Sun Apr 13 16:54:09 2014 +0200
+++ b/MozillaFirefox/create-tar.sh	Mon Apr 14 09:09:11 2014 +0200
@@ -1,9 +1,9 @@
 #!/bin/bash
 
-CHANNEL="release"
+CHANNEL="beta"
 BRANCH="releases/mozilla-$CHANNEL"
-RELEASE_TAG="FIREFOX_28_0_RELEASE"
-VERSION="28.0"
+RELEASE_TAG="FIREFOX_29_0b7_RELEASE"
+VERSION="28.99"
 
 # mozilla
 if [ -d mozilla ]; then
--- a/MozillaFirefox/mozilla-aarch64-599882cfb998.diff	Sun Apr 13 16:54:09 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-../mozilla-aarch64-599882cfb998.diff
\ No newline at end of file
--- a/MozillaFirefox/mozilla-aarch64-bmo-963028.patch	Sun Apr 13 16:54:09 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-../mozilla-aarch64-bmo-963028.patch
\ No newline at end of file
--- a/MozillaFirefox/mozilla-aarch64-bmo-963029.patch	Sun Apr 13 16:54:09 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-../mozilla-aarch64-bmo-963029.patch
\ No newline at end of file
--- a/MozillaFirefox/mozilla-aarch64-bmo-963030.patch	Sun Apr 13 16:54:09 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-../mozilla-aarch64-bmo-963030.patch
\ No newline at end of file
--- a/MozillaFirefox/mozilla-aarch64-bmo-963031.patch	Sun Apr 13 16:54:09 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-../mozilla-aarch64-bmo-963031.patch
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-icu-strncat.patch	Mon Apr 14 09:09:11 2014 +0200
@@ -0,0 +1,1 @@
+../mozilla-icu-strncat.patch
\ No newline at end of file
--- a/firefox-kde.patch	Sun Apr 13 16:54:09 2014 +0200
+++ b/firefox-kde.patch	Mon Apr 14 09:09:11 2014 +0200
@@ -2,7 +2,7 @@
 new file mode 100644
 --- /dev/null
 +++ b/browser/base/content/browser-kde.xul
-@@ -0,0 +1,1177 @@
+@@ -0,0 +1,1213 @@
 +#filter substitution
 +<?xml version="1.0"?>
 +# -*- Mode: HTML -*-
@@ -14,7 +14,9 @@
 +<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
 +<?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
 +<?xml-stylesheet href="chrome://browser/skin/devtools/common.css" type="text/css"?>
++<?xml-stylesheet href="chrome://browser/skin/customizableui/panelUIOverlay.css" type="text/css"?>
 +<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
++<?xml-stylesheet href="chrome://browser/skin/browser-lightweightTheme.css" type="text/css"?>
 +
 +<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
 +<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
@@ -44,6 +46,14 @@
 +        titlemodifier_normal="&mainWindow.titlemodifier;"
 +        titlemodifier_privatebrowsing="&mainWindow.titlemodifier; &mainWindow.titlePrivateBrowsingSuffix;"
 +#endif
++#ifdef CAN_DRAW_IN_TITLEBAR
++#ifdef XP_WIN
++        chromemargin="0,2,2,2"
++#else
++        chromemargin="0,-1,-1,-1"
++#endif
++        tabsintitlebar="true"
++#endif
 +        titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
 +        lightweightthemes="true"
 +        lightweightthemesfooter="browser-bottombox"
@@ -51,6 +61,7 @@
 +        macanimationtype="document"
 +        screenX="4" screenY="4"
 +        fullscreenbutton="true"
++        sizemode="normal"
 +        persist="screenX screenY width height sizemode">
 +
 +# All JS files which are not content (only) dependent that browser.xul
@@ -123,6 +134,7 @@
 +               oncommand="gotoHistoryIndex(event); event.stopPropagation();"
 +               onclick="checkForMiddleClick(this, event);"/>
 +    <tooltip id="aHTMLTooltip" page="true"/>
++    <tooltip id="remoteBrowserTooltip"/>
 +
 +    <!-- for search and content formfill/pw manager -->
 +    <panel type="autocomplete" id="PopupAutoComplete" noautofocus="true" hidden="true"/>
@@ -192,41 +204,37 @@
 +           type="arrow"
 +           hidden="true"
 +           noautofocus="true"
++           noautohide="true"
 +           align="start"
 +           orient="vertical"
 +           role="alert">
-+      <label id="UITourTooltipTitle" flex="1"/>
-+      <description id="UITourTooltipDescription" flex="1"/>
++     <vbox>
++      <hbox pack="end">
++        <toolbarbutton id="UITourTooltipClose" class="close-icon"
++                       tooltiptext="&uiTour.infoPanel.close;"/>
++      </hbox>
++      <hbox id="UITourTooltipBody">
++        <vbox id="UITourTooltipIconContainer">
++          <image id="UITourTooltipIcon"/>
++        </vbox>
++        <vbox flex="1">
++          <label id="UITourTooltipTitle" flex="1"/>
++          <description id="UITourTooltipDescription" flex="1"/>
++        </vbox>
++      </hbox>
++      <hbox id="UITourTooltipButtons" flex="1" align="center"/>
++     </vbox>
 +    </panel>
-+    <html:div id="UITourHighlightContainer" style="position:relative">
-+      <html:div id="UITourHighlight"></html:div>
-+    </html:div>
-+
-+    <panel id="socialActivatedNotification"
-+           type="arrow"
++    <!-- type="default" forces frames to be created so that the panel's size can be determined --> 
++    <panel id="UITourHighlightContainer"
++           type="default"
 +           hidden="true"
-+           align="start"
-+           orient="horizontal"
-+           role="alert">
-+      <image id="social-activation-icon" class="popup-notification-icon"/>
-+      <vbox flex="1">
-+        <description id="social-activation-message" class="popup-notification-description">&social.activated.description;</description>
-+        <spacer flex="1"/>
-+        <hbox pack="start" align="center" class="popup-notification-button-container">
-+          <label  id="social-undoactivation-button"
-+                  class="text-link"
-+                  value="&social.activated.undo.label;"
-+                  accesskey="&social.activated.undo.accesskey;"
-+                  onclick="SocialUI.undoActivation(this);"/>
-+          <spacer flex="1"/>
-+          <button id="social-activation-button"
-+                  default="true"
-+                  autofocus="autofocus"
-+                  label="&social.ok.label;"
-+                  accesskey="&social.ok.accesskey;"
-+                  oncommand="SocialUI.activationPanel.hidePopup();"/>
-+        </hbox>
-+      </vbox>
++           noautofocus="true"
++           noautohide="true"
++           flip="none"
++           consumeoutsideclicks="false"
++           mousethrough="always">
++      <box id="UITourHighlight"></box>
 +    </panel>
 +
 +    <panel id="social-share-panel"
@@ -259,13 +267,26 @@
 +           position="topcenter topright"/>
 +
 +    <menupopup id="toolbar-context-menu"
-+               onpopupshowing="onViewToolbarsPopupShowing(event);">
++               onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator'));">
++      <menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
++                accesskey="&customizeMenu.moveToPanel.accesskey;"
++                label="&customizeMenu.moveToPanel.label;"
++                class="customize-context-moveToPanel"/>
++      <menuitem oncommand="gCustomizeMode.removeFromArea(document.popupNode)"
++                accesskey="&customizeMenu.removeFromToolbar.accesskey;"
++                label="&customizeMenu.removeFromToolbar.label;"
++                class="customize-context-removeFromToolbar"/>
 +      <menuseparator/>
-+      <menuitem command="cmd_ToggleTabsOnTop"
-+                type="checkbox"
-+                label="&viewTabsOnTop.label;"
-+                accesskey="&viewTabsOnTop.accesskey;"/>
-+      <menuitem command="cmd_CustomizeToolbars"
++      <menuseparator id="viewToolbarsMenuSeparator"/>
++      <!-- XXXgijs: we're using oncommand handler here to avoid the event being
++                    redirected to the command element, thus preventing
++                    listeners on the menupopup or further up the tree from
++                    seeing the command event pass by. The observes attribute is
++                    here so that the menuitem is still disabled and re-enabled
++                    correctly. -->
++      <menuitem oncommand="BrowserCustomizeToolbar()"
++                observes="cmd_CustomizeToolbars"
++                class="viewCustomizeToolbar"
 +                label="&viewCustomizeToolbar.label;"
 +                accesskey="&viewCustomizeToolbar.accesskey;"/>
 +    </menupopup>
@@ -382,13 +403,51 @@
 +      </hbox>
 +    </panel>
 +
++    <!-- Sync Panel -->
++    <panel id="sync-start-panel" class="sync-panel" type="arrow" hidden="true"
++           noautofocus="true" onclick="this.hidePopup();"
++           flip="slide">
++      <hbox class="sync-panel-outer">
++        <image class="sync-panel-icon"/>
++        <vbox class="sync-panel-inner">
++          <description id="sync-start-panel-title"
++                       value="&syncStartPanel.heading;"/>
++          <description id="sync-start-panel-subtitle">
++#ifdef XP_UNIX
++            &syncStartPanel.subTitleUnix;
++#else
++            &syncStartPanel.subTitle;
++#endif
++          </description>
++        </vbox>
++      </hbox>
++    </panel>
++
++    <!-- Sync Error Panel -->
++    <panel id="sync-error-panel" class="sync-panel" type="arrow" hidden="true"
++           noautofocus="true" onclick="this.hidePopup();"
++           flip="slide">
++      <hbox class="sync-panel-outer">
++        <image class="sync-panel-icon"/>
++        <vbox class="sync-panel-inner">
++          <description id="sync-error-panel-title"
++                       value="&syncErrorPanel.heading;"/>
++          <description id="sync-error-panel-subtitle"
++                       value="&syncErrorPanel.subTitle;"/>
++          <hbox class="sync-panel-button-box">
++            <spacer flex="1"/>
++            <button class="sync-panel-button"
++                    label="&syncErrorPanel.signInButton.label;"
++                    accesskey="&syncErrorPanel.signInButton.accesskey;"
++                    onclick="gFxAccounts.openSignInAgainPage();"/>
++          </hbox>
++        </vbox>
++      </hbox>
++    </panel>
++
 +    <!-- Bookmarks and history tooltip -->
 +    <tooltip id="bhTooltip"/>
 +
-+    <panel id="customizeToolbarSheetPopup"
-+           noautohide="true"
-+           sheetstyle="&dialog.dimensions;"/>
-+
 +    <tooltip id="tabbrowser-tab-tooltip" onpopupshowing="gBrowser.createTooltip(event);"/>
 +
 +    <tooltip id="back-button-tooltip">
@@ -411,34 +470,46 @@
 +
 +#include popup-notifications.inc
 +
++#include ../../components/customizableui/content/panelUI.inc.xul
++
 +    <hbox id="downloads-animation-container" mousethrough="always">
 +      <vbox id="downloads-notification-anchor">
 +        <vbox id="downloads-indicator-notification"/>
 +      </vbox>
 +    </hbox>
++
++    <hbox id="bookmarked-notification-container" mousethrough="always">
++      <vbox id="bookmarked-notification-anchor">
++        <vbox id="bookmarked-notification"/>
++      </vbox>
++      <vbox id="bookmarked-notification-dropmarker-anchor">
++        <image id="bookmarked-notification-dropmarker-icon"/>
++      </vbox>
++    </hbox>
++
++    <tooltip id="dynamic-shortcut-tooltip"
++             onpopupshowing="UpdateDynamicShortcutTooltipText(this);"/>
 +  </popupset>
 +
 +#ifdef CAN_DRAW_IN_TITLEBAR
 +<vbox id="titlebar">
 +  <hbox id="titlebar-content">
-+#ifdef MENUBAR_CAN_AUTOHIDE
-+    <hbox id="appmenu-button-container">
-+      <button id="appmenu-button"
-+              type="menu"
-+              label="&brandShortName;"
-+              style="-moz-user-focus: ignore;">
-+#include browser-appmenu.inc
-+      </button>
-+    </hbox>
++    <spacer id="titlebar-spacer" flex="1"/>
++    <hbox id="titlebar-buttonbox-container">
++#ifdef XP_WIN
++      <hbox id="private-browsing-indicator-titlebar">
++        <hbox class="private-browsing-indicator"/>
++      </hbox>
 +#endif
-+    <spacer id="titlebar-spacer" flex="1"/>
-+    <hbox id="titlebar-buttonbox-container" align="start">
 +      <hbox id="titlebar-buttonbox">
 +        <toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/>
 +        <toolbarbutton class="titlebar-button" id="titlebar-max" oncommand="onTitlebarMaxClick();"/>
 +        <toolbarbutton class="titlebar-button" id="titlebar-close" command="cmd_closeWindow"/>
 +      </hbox>
 +    </hbox>
++#ifdef XP_MACOSX
++    <hbox id="titlebar-fullscreen-button"/>
++#endif
 +  </hbox>
 +</vbox>
 +#endif
@@ -446,334 +517,428 @@
 +<deck flex="1" id="tab-view-deck">
 +<vbox flex="1" id="browser-panel">
 +
-+  <toolbox id="navigator-toolbox"
-+           defaultmode="icons" mode="icons"
-+           iconsize="large">
++  <toolbox id="navigator-toolbox" mode="icons">
 +    <!-- Menu -->
 +    <toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
 +             defaultset="menubar-items"
-+             mode="icons" iconsize="small" defaulticonsize="small"
-+             lockiconsize="true"
++             mode="icons" iconsize="small"
 +#ifdef MENUBAR_CAN_AUTOHIDE
 +             toolbarname="&menubarCmd.label;"
 +             accesskey="&menubarCmd.accesskey;"
++#if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)
++             autohide="true"
++#endif
 +#endif
 +             context="toolbar-context-menu">
-+      <toolbaritem id="menubar-items" align="center">
++      <toolbaritem id="menubar-items" align="center"
++                   cui-areatype="toolbar">
 +# The entire main menubar is placed into browser-menubar.inc, so that it can be shared by
 +# hiddenWindow.xul.
 +#include browser-menubar.inc
 +      </toolbaritem>
 +
 +#ifdef CAN_DRAW_IN_TITLEBAR
-+      <hbox class="titlebar-placeholder" type="appmenu-button" ordinal="0"/>
-+      <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"/>
++#ifndef XP_MACOSX
++      <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"
++            id="titlebar-placeholder-on-menubar-for-caption-buttons" persist="width"
++            skipintoolbarset="true"/>
++#endif
++#endif
++    </toolbar>
++
++    <toolbar id="TabsToolbar"
++             class="toolbar-primary"
++             fullscreentoolbar="true"
++             customizable="true"
++             mode="icons"
++             iconsize="small"
++             aria-label="&tabsToolbar.label;"
++             context="toolbar-context-menu"
++             defaultset="tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton"
++             collapsed="true">
++
++#if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)
++      <hbox id="private-browsing-indicator"
++            skipintoolbarset="true"/>
++#endif
++
++      <tabs id="tabbrowser-tabs"
++            class="tabbrowser-tabs"
++            tabbrowser="content"
++            flex="1"
++            setfocus="false"
++            tooltip="tabbrowser-tab-tooltip"
++            cui-areatype="toolbar"
++            stopwatchid="FX_TAB_CLICK_MS">
++        <tab class="tabbrowser-tab" selected="true" fadein="true"/>
++      </tabs>
++
++      <toolbarbutton id="new-tab-button"
++                     class="toolbarbutton-1 chromeclass-toolbar-additional"
++                     label="&tabCmd.label;"
++                     command="cmd_newNavigatorTab"
++                     onclick="checkForMiddleClick(this, event);"
++                     tooltiptext="&newTabButton.tooltip;"
++                     ondrop="newTabButtonObserver.onDrop(event)"
++                     ondragover="newTabButtonObserver.onDragOver(event)"
++                     ondragenter="newTabButtonObserver.onDragOver(event)"
++                     ondragexit="newTabButtonObserver.onDragExit(event)"
++                     cui-areatype="toolbar"
++                     removable="true"/>
++
++      <toolbarbutton id="alltabs-button"
++                     class="toolbarbutton-1 chromeclass-toolbar-additional tabs-alltabs-button"
++                     type="menu"
++                     label="&listAllTabs.label;"
++                     tooltiptext="&listAllTabs.label;"
++                     removable="false">
++        <menupopup id="alltabs-popup"
++                   position="after_end">
++          <menuitem id="menu_tabview"
++                    class="menuitem-iconic"
++                    key="key_tabview"
++                    label="&viewTabGroups.label;"
++                    command="Browser:ToggleTabView"
++                    cui-areatype="toolbar"
++                    observes="tabviewGroupsNumber"/>
++          <menuseparator id="alltabs-popup-separator"/>
++        </menupopup>
++      </toolbarbutton>
++
++      <toolbarbutton id="tabs-closebutton"
++                     class="close-button tabs-closebutton close-icon"
++                     command="cmd_close"
++                     label="&closeTab.label;"
++                     cui-areatype="toolbar"
++                     tooltiptext="&closeTab.label;"/>
++
++#ifdef XP_WIN
++      <hbox class="private-browsing-indicator" skipintoolbarset="true" ordinal="1000"/>
++#endif
++#ifdef CAN_DRAW_IN_TITLEBAR
++      <hbox class="titlebar-placeholder" type="caption-buttons"
++            id="titlebar-placeholder-on-TabsToolbar-for-captions-buttons" persist="width"
++#ifndef XP_MACOSX
++            ordinal="1000"
++#endif
++            skipintoolbarset="true"/>
++
++#ifdef XP_MACOSX
++      <hbox class="titlebar-placeholder" type="fullscreen-button"
++            id="titlebar-placeholder-on-TabsToolbar-for-fullscreen-button" persist="width"
++            skipintoolbarset="true"/>
++#endif
 +#endif
 +    </toolbar>
 +
++    <!--
++           CAVEAT EMPTOR
++           Should you need to add items to the toolbar here, make sure to also add them
++           to the default placements of buttons in CustomizableUI.jsm, so the
++           customization code doesn't get confused.
++      -->
 +    <toolbar id="nav-bar" class="toolbar-primary chromeclass-toolbar"
-+             toolbarname="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;"
++             aria-label="&navbarCmd.label;"
 +             fullscreentoolbar="true" mode="icons" customizable="true"
-+             iconsize="large"
-+             defaultset="unified-back-forward-button,urlbar-container,reload-button,stop-button,search-container,webrtc-status-button,bookmarks-menu-button,downloads-button,home-button,window-controls"
++             iconsize="small"
++             defaultset="urlbar-container,search-container,webrtc-status-button,bookmarks-menu-button,downloads-button,home-button,social-share-button,social-toolbar-item"
++             customizationtarget="nav-bar-customization-target"
++             overflowable="true"
++             overflowbutton="nav-bar-overflow-button"
++             overflowtarget="widget-overflow-list"
++             overflowpanel="widget-overflow"
 +             context="toolbar-context-menu">
 +
-+      <toolbaritem id="unified-back-forward-button" class="chromeclass-toolbar-additional"
-+                   context="backForwardMenu" removable="true"
-+                   forwarddisabled="true"
-+                   title="&backForwardItem.title;">
-+        <toolbarbutton id="back-button" class="toolbarbutton-1"
-+                       label="&backCmd.label;"
-+                       command="Browser:BackOrBackDuplicate"
-+                       onclick="checkForMiddleClick(this, event);"
-+                       tooltip="back-button-tooltip"/>
-+        <toolbarbutton id="forward-button" class="toolbarbutton-1"
-+                       label="&forwardCmd.label;"
-+                       command="Browser:ForwardOrForwardDuplicate"
-+                       onclick="checkForMiddleClick(this, event);"
-+                       tooltip="forward-button-tooltip"/>
-+        <dummyobservertarget hidden="true"
-+                             onbroadcast="if (this.getAttribute('disabled') == 'true')
-+                                            this.parentNode.setAttribute('forwarddisabled', 'true');
-+                                          else
-+                                            this.parentNode.removeAttribute('forwarddisabled');">
-+          <observes element="Browser:ForwardOrForwardDuplicate" attribute="disabled"/>
-+        </dummyobservertarget>
-+      </toolbaritem>
++      <hbox id="nav-bar-customization-target" flex="1">
++        <toolbaritem id="urlbar-container" flex="400" persist="width"
++                     forwarddisabled="true" title="&locationItem.title;" removable="false"
++                     cui-areatype="toolbar"
++                     class="chromeclass-location" overflows="false">
++          <toolbarbutton id="back-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
++                         label="&backCmd.label;"
++                         command="Browser:BackOrBackDuplicate"
++                         cui-areatype="toolbar"
++                         onclick="checkForMiddleClick(this, event);"
++                         tooltip="back-button-tooltip"
++                         context="backForwardMenu"/>
++          <toolbarbutton id="forward-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
++                         label="&forwardCmd.label;"
++                         command="Browser:ForwardOrForwardDuplicate"
++                         cui-areatype="toolbar"
++                         onclick="checkForMiddleClick(this, event);"
++                         tooltip="forward-button-tooltip"
++                         context="backForwardMenu"/>
++          <dummyobservertarget hidden="true"
++                               onbroadcast="if (this.getAttribute('disabled') == 'true')
++                                              this.parentNode.setAttribute('forwarddisabled', 'true');
++                                            else
++                                              this.parentNode.removeAttribute('forwarddisabled');">
++            <observes element="Browser:ForwardOrForwardDuplicate" attribute="disabled"/>
++          </dummyobservertarget>
++          <hbox id="urlbar-wrapper" flex="1" align="center">
++            <textbox id="urlbar" flex="1"
++                     placeholder="&urlbar.placeholder2;"
++                     type="autocomplete"
++                     autocompletesearch="urlinline history"
++                     autocompletesearchparam="enable-actions"
++                     autocompletepopup="PopupAutoCompleteRichResult"
++                     completeselectedindex="true"
++                     tabscrolling="true"
++                     showcommentcolumn="true"
++                     showimagecolumn="true"
++                     enablehistory="true"
++                     maxrows="6"
++                     newlines="stripsurroundingwhitespace"
++                     oninput="gBrowser.userTypedValue = this.value;"
++                     ontextentered="this.handleCommand(param);"
++                     ontextreverted="return this.handleRevert();"
++                     pageproxystate="invalid"
++                     onfocus="document.getElementById('identity-box').style.MozUserFocus= 'normal'"
++                     onblur="setTimeout(function() document.getElementById('identity-box').style.MozUserFocus = '', 0);">
++              <box id="notification-popup-box" hidden="true" align="center">
++                <image id="default-notification-icon" class="notification-anchor-icon" role="button"/>
++                <image id="identity-notification-icon" class="notification-anchor-icon" role="button"/>
++                <image id="geo-notification-icon" class="notification-anchor-icon" role="button"/>
++                <image id="addons-notification-icon" class="notification-anchor-icon" role="button"/>
++                <image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"/>
++                <image id="password-notification-icon" class="notification-anchor-icon" role="button"/>
++                <image id="webapps-notification-icon" class="notification-anchor-icon" role="button"/>
++                <image id="plugins-notification-icon" class="notification-anchor-icon" role="button"/>
++                <image id="web-notifications-notification-icon" class="notification-anchor-icon" role="button"/>
++                <image id="plugin-install-notification-icon" class="notification-anchor-icon" role="button"/>
++                <image id="mixed-content-blocked-notification-icon" class="notification-anchor-icon" role="button"/>
++                <image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon" role="button"/>
++                <image id="webRTC-sharingDevices-notification-icon" class="notification-anchor-icon" role="button"/>
++                <image id="pointerLock-notification-icon" class="notification-anchor-icon" role="button"/>
++                <image id="servicesInstall-notification-icon" class="notification-anchor-icon" role="button"/>
++              </box>
++              <!-- Use onclick instead of normal popup= syntax since the popup
++                   code fires onmousedown, and hence eats our favicon drag events.
++                   We only add the identity-box button to the tab order when the location bar
++                   has focus, otherwise pressing F6 focuses it instead of the location bar -->
++              <box id="identity-box" role="button"
++                   align="center"
++                   onclick="gIdentityHandler.handleIdentityButtonEvent(event);"
++                   onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);"
++                   ondragstart="gIdentityHandler.onDragStart(event);">
++                <image id="page-proxy-favicon"
++                       onclick="PageProxyClickHandler(event);"
++                       pageproxystate="invalid"/>
++                <hbox id="identity-icon-labels">
++                  <label id="identity-icon-label" class="plain" flex="1"/>
++                  <label id="identity-icon-country-label" class="plain"/>
++                </hbox>
++              </box>
++              <box id="urlbar-display-box" align="center">
++                <label id="urlbar-display" value="&urlbar.switchToTab.label;"/>
++              </box>
++              <hbox id="urlbar-icons">
++                <image id="page-report-button"
++                       class="urlbar-icon"
++                       hidden="true"
++                       tooltiptext="&pageReportIcon.tooltip;"
++                       onclick="gPopupBlockerObserver.onReportButtonClick(event);"/>
++              </hbox>
++              <toolbarbutton id="urlbar-go-button"
++                             class="chromeclass-toolbar-additional"
++                             onclick="gURLBar.handleCommand(event);"
++                             tooltiptext="&goEndCap.tooltip;"/>
++              <toolbarbutton id="urlbar-reload-button"
++                             class="chromeclass-toolbar-additional"
++                             command="Browser:ReloadOrDuplicate"
++                             onclick="checkForMiddleClick(this, event);"
++                             tooltiptext="&reloadButton.tooltip;"/>
++              <toolbarbutton id="urlbar-stop-button"
++                             class="chromeclass-toolbar-additional"
++                             command="Browser:Stop"
++                             tooltiptext="&stopButton.tooltip;"/>
++            </textbox>
++          </hbox>
++        </toolbaritem>
++
++        <toolbaritem id="search-container" title="&searchItem.title;"
++                     align="center" class="chromeclass-toolbar-additional panel-wide-item"
++                     cui-areatype="toolbar"
++                     flex="100" persist="width" removable="true">
++          <searchbar id="searchbar" flex="1"/>
++        </toolbaritem>
++
++        <toolbarbutton id="webrtc-status-button"
++                       class="toolbarbutton-1 chromeclass-toolbar-additional"
++                       type="menu"
++                       hidden="true"
++                       orient="horizontal"
++                       label="&webrtcIndicatorButton.label;"
++                       tooltiptext="&webrtcIndicatorButton.tooltip;"
++                       cui-areatype="toolbar"
++                       overflows="false">
++          <menupopup onpopupshowing="WebrtcIndicator.fillPopup(this);"
++                     onpopuphiding="WebrtcIndicator.clearPopup(this);"
++                     oncommand="WebrtcIndicator.menuCommand(event.target);"/>
++        </toolbarbutton>
 +
-+      <toolbaritem id="urlbar-container" align="center" flex="400" persist="width" combined="true"
-+                   title="&locationItem.title;" class="chromeclass-location" removable="true">
-+        <textbox id="urlbar" flex="1"
-+                 placeholder="&urlbar.placeholder2;"
-+                 type="autocomplete"
-+                 autocompletesearch="urlinline history"
-+                 autocompletesearchparam="enable-actions"
-+                 autocompletepopup="PopupAutoCompleteRichResult"
-+                 completeselectedindex="true"
-+                 tabscrolling="true"
-+                 showcommentcolumn="true"
-+                 showimagecolumn="true"
-+                 enablehistory="true"
-+                 maxrows="6"
-+                 newlines="stripsurroundingwhitespace"
-+                 oninput="gBrowser.userTypedValue = this.value;"
-+                 ontextentered="this.handleCommand(param);"
-+                 ontextreverted="return this.handleRevert();"
-+                 pageproxystate="invalid"
-+                 onfocus="document.getElementById('identity-box').style.MozUserFocus= 'normal'"
-+                 onblur="setTimeout(function() document.getElementById('identity-box').style.MozUserFocus = '', 0);">
-+          <box id="notification-popup-box" hidden="true" align="center">
-+            <image id="default-notification-icon" class="notification-anchor-icon" role="button"/>
-+            <image id="identity-notification-icon" class="notification-anchor-icon" role="button"/>
-+            <image id="geo-notification-icon" class="notification-anchor-icon" role="button"/>
-+            <image id="addons-notification-icon" class="notification-anchor-icon" role="button"/>
-+            <image id="indexedDB-notification-icon" class="notification-anchor-icon" role="button"/>
-+            <image id="password-notification-icon" class="notification-anchor-icon" role="button"/>
-+            <image id="webapps-notification-icon" class="notification-anchor-icon" role="button"/>
-+            <image id="plugins-notification-icon" class="notification-anchor-icon" role="button"/>
-+            <image id="web-notifications-notification-icon" class="notification-anchor-icon" role="button"/>
-+            <image id="plugin-install-notification-icon" class="notification-anchor-icon" role="button"/>
-+            <image id="mixed-content-blocked-notification-icon" class="notification-anchor-icon" role="button"/>
-+            <image id="webRTC-shareDevices-notification-icon" class="notification-anchor-icon" role="button"/>
-+            <image id="webRTC-sharingDevices-notification-icon" class="notification-anchor-icon" role="button"/>
-+            <image id="pointerLock-notification-icon" class="notification-anchor-icon" role="button"/>
-+            <image id="servicesInstall-notification-icon" class="notification-anchor-icon" role="button"/>
-+          </box>
-+          <!-- Use onclick instead of normal popup= syntax since the popup
-+               code fires onmousedown, and hence eats our favicon drag events.
-+               We only add the identity-box button to the tab order when the location bar
-+               has focus, otherwise pressing F6 focuses it instead of the location bar -->
-+          <box id="identity-box" role="button"
-+               align="center"
-+               onclick="gIdentityHandler.handleIdentityButtonEvent(event);"
-+               onkeypress="gIdentityHandler.handleIdentityButtonEvent(event);"
-+               ondragstart="gIdentityHandler.onDragStart(event);">
-+            <image id="page-proxy-favicon"
-+                   onclick="PageProxyClickHandler(event);"
-+                   pageproxystate="invalid"/>
-+            <hbox id="identity-icon-labels">
-+              <label id="identity-icon-label" class="plain" flex="1"/>
-+              <label id="identity-icon-country-label" class="plain"/>
-+            </hbox>
-+          </box>
-+          <box id="urlbar-display-box" align="center">
-+            <label id="urlbar-display" value="&urlbar.switchToTab.label;"/>
-+          </box>
-+          <hbox id="urlbar-icons">
-+            <image id="page-report-button"
-+                   class="urlbar-icon"
-+                   hidden="true"
-+                   tooltiptext="&pageReportIcon.tooltip;"
-+                   onclick="gPopupBlockerObserver.onReportButtonClick(event);"/>
-+            <image id="star-button"
-+                   class="urlbar-icon"
-+                   onclick="if (event.button === 0) BookmarkingUI.onCommand(event);"/>
-+            <image id="go-button"
-+                   class="urlbar-icon"
-+                   tooltiptext="&goEndCap.tooltip;"
-+                   onclick="gURLBar.handleCommand(event);"/>
-+          </hbox>
-+          <toolbarbutton id="urlbar-go-button"
-+                         class="chromeclass-toolbar-additional"
-+                         onclick="gURLBar.handleCommand(event);"
-+                         tooltiptext="&goEndCap.tooltip;"/>
-+          <toolbarbutton id="urlbar-reload-button"
-+                         class="chromeclass-toolbar-additional"
-+                         command="Browser:ReloadOrDuplicate"
-+                         onclick="checkForMiddleClick(this, event);"
-+                         tooltiptext="&reloadButton.tooltip;"/>
-+          <toolbarbutton id="urlbar-stop-button"
-+                         class="chromeclass-toolbar-additional"
-+                         command="Browser:Stop"
-+                         tooltiptext="&stopButton.tooltip;"/>
-+        </textbox>
-+      </toolbaritem>
++        <toolbarbutton id="bookmarks-menu-button"
++                       class="toolbarbutton-1 chromeclass-toolbar-additional"
++                       persist="class"
++                       removable="true"
++                       type="menu-button"
++                       label="&bookmarksMenuButton.label;"
++                       tooltip="dynamic-shortcut-tooltip"
++                       anchor="dropmarker"
++                       ondragenter="PlacesMenuDNDHandler.onDragEnter(event);"
++                       ondragover="PlacesMenuDNDHandler.onDragOver(event);"
++                       ondragleave="PlacesMenuDNDHandler.onDragLeave(event);"
++                       ondrop="PlacesMenuDNDHandler.onDrop(event);"
++                       cui-areatype="toolbar"
++                       oncommand="BookmarkingUI.onCommand(event);">
++          <menupopup id="BMB_bookmarksPopup"
++                     class="cui-widget-panel cui-widget-panelview cui-widget-panelWithFooter PanelUI-subView"
++                     placespopup="true"
++                     context="placesContext"
++                     openInTabs="children"
++                     oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);"
++                     onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
++                     onpopupshowing="BookmarkingUI.onPopupShowing(event);
++                                     BookmarkingUI.attachPlacesView(event, this);"
++                     tooltip="bhTooltip" popupsinherittooltip="true">
++            <menuitem id="BMB_viewBookmarksSidebar"
++                      class="subviewbutton"
++                      label="&viewBookmarksSidebar2.label;"
++                      type="checkbox"
++                      oncommand="toggleSidebar('viewBookmarksSidebar');">
++              <observes element="viewBookmarksSidebar" attribute="checked"/>
++            </menuitem>
++            <menuseparator/>
++            <menuitem id="BMB_subscribeToPageMenuitem"
++#ifndef XP_MACOSX
++                      class="menuitem-iconic subviewbutton"
++#else
++                      class="subviewbutton"
++#endif
++                      label="&subscribeToPageMenuitem.label;"
++                      oncommand="return FeedHandler.subscribeToFeed(null, event);"
++                      onclick="checkForMiddleClick(this, event);"
++                      observes="singleFeedMenuitemState"/>
++            <menu id="BMB_subscribeToPageMenupopup"
++#ifndef XP_MACOSX
++                  class="menu-iconic subviewbutton"
++#else
++                  class="subviewbutton"
++#endif
++                  label="&subscribeToPageMenupopup.label;"
++                  observes="multipleFeedsMenuState">
++              <menupopup id="BMB_subscribeToPageSubmenuMenupopup"
++                         onpopupshowing="return FeedHandler.buildFeedList(event.target);"
++                         oncommand="return FeedHandler.subscribeToFeed(null, event);"
++                         onclick="checkForMiddleClick(this, event);"/>
++            </menu>
++            <menuseparator/>
++            <menu id="BMB_bookmarksToolbar"
++                  class="menu-iconic bookmark-item subviewbutton"
++                  label="&personalbarCmd.label;"
++                  container="true">
++              <menupopup id="BMB_bookmarksToolbarPopup"
++                         placespopup="true"
++                         context="placesContext"
++                         onpopupshowing="if (!this.parentNode._placesView)
++                                           new PlacesMenu(event, 'place:folder=TOOLBAR',
++                                                          PlacesUIUtils.getViewForNode(this.parentNode.parentNode).options);">
++                <menuitem id="BMB_viewBookmarksToolbar"
++                          placesanonid="view-toolbar"
++                          toolbarId="PersonalToolbar"
++                          type="checkbox"
++                          oncommand="onViewToolbarCommand(event)"
++                          label="&viewBookmarksToolbar.label;"/>
++                <menuseparator/>
++                <!-- Bookmarks toolbar items -->
++              </menupopup>
++            </menu>
++            <menu id="BMB_unsortedBookmarks"
++                  class="menu-iconic bookmark-item subviewbutton"
++                  label="&bookmarksMenuButton.unsorted.label;"
++                  container="true">
++              <menupopup id="BMB_unsortedBookmarksPopup"
++                         placespopup="true"
++                         context="placesContext"
++                         onpopupshowing="if (!this.parentNode._placesView)
++                                           new PlacesMenu(event, 'place:folder=UNFILED_BOOKMARKS',
++                                                          PlacesUIUtils.getViewForNode(this.parentNode.parentNode).options);"/>
++            </menu>
++            <menuseparator/>
++            <!-- Bookmarks menu items will go here -->
++            <menuitem id="BMB_bookmarksShowAll"
++                      class="subviewbutton panel-subview-footer"
++                      label="&showAllBookmarks2.label;"
++                      command="Browser:ShowAllBookmarks"
++                      key="manBookmarkKb"/>
++          </menupopup>
++        </toolbarbutton>
 +
-+      <toolbarbutton id="reload-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
-+                     label="&reloadCmd.label;" removable="true"
-+                     command="Browser:ReloadOrDuplicate"
-+                     onclick="checkForMiddleClick(this, event);"
-+                     tooltiptext="&reloadButton.tooltip;"/>
++        <!-- This is a placeholder for the Downloads Indicator.  It is visible
++             during the customization of the toolbar, in the palette, and before
++             the Downloads Indicator overlay is loaded. -->
++        <toolbarbutton id="downloads-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
++                       oncommand="DownloadsIndicatorView.onCommand(event);"
++                       ondrop="DownloadsIndicatorView.onDrop(event);"
++                       ondragover="DownloadsIndicatorView.onDragOver(event);"
++                       ondragenter="DownloadsIndicatorView.onDragOver(event);"
++                       label="&downloads.label;"
++                       removable="true"
++                       cui-areatype="toolbar"
++                       tooltiptext="&downloads.tooltip;"/>
++
++        <toolbarbutton id="home-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
++                       persist="class" removable="true"
++                       label="&homeButton.label;"
++                       ondragover="homeButtonObserver.onDragOver(event)"
++                       ondragenter="homeButtonObserver.onDragOver(event)"
++                       ondrop="homeButtonObserver.onDrop(event)"
++                       ondragexit="homeButtonObserver.onDragExit(event)"
++                       onclick="BrowserGoHome(event);"
++                       cui-areatype="toolbar"
++                       aboutHomeOverrideTooltip="&abouthome.pageTitle;"/>
++
 +
-+      <toolbarbutton id="stop-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
-+                     label="&stopCmd.label;" removable="true"
-+                     command="Browser:Stop"
-+                     tooltiptext="&stopButton.tooltip;"/>
++        <toolbarbutton id="social-share-button"
++                       class="toolbarbutton-1 chromeclass-toolbar-additional"
++                       hidden="true"
++                       overflows="false"
++                       label="&sharePageCmd.label;"
++                       tooltiptext="&sharePageCmd.label;"
++                       cui-areatype="toolbar"
++                       command="Social:SharePage"/>
++      </hbox>
 +
-+      <toolbaritem id="search-container" title="&searchItem.title;"
-+                   align="center" class="chromeclass-toolbar-additional"
-+                   flex="100" persist="width" removable="true">
-+        <searchbar id="searchbar" flex="1"/>
++      <toolbarbutton id="nav-bar-overflow-button"
++                     class="toolbarbutton-1 chromeclass-toolbar-additional overflow-button"
++                     cui-areatype="toolbar"
++                     skipintoolbarset="true"
++                     tooltiptext="&navbarOverflow.label;"/>
++
++      <toolbaritem id="PanelUI-button"
++                   class="chromeclass-toolbar-additional"
++                   cui-areatype="toolbar"
++                   removable="false">
++        <toolbarbutton id="PanelUI-menu-button"
++                       class="toolbarbutton-1"
++                       cui-areatype="toolbar"
++                       label="&brandShortName;"
++                       tooltiptext="&appmenu.tooltip;"/>
 +      </toolbaritem>
 +
-+      <toolbarbutton id="webrtc-status-button"
-+                     class="toolbarbutton-1 chromeclass-toolbar-additional"
-+                     type="menu"
-+                     hidden="true"
-+                     orient="horizontal"
-+                     label="&webrtcIndicatorButton.label;"
-+                     tooltiptext="&webrtcIndicatorButton.tooltip;">
-+        <menupopup onpopupshowing="WebrtcIndicator.fillPopup(this);"
-+                   onpopuphiding="WebrtcIndicator.clearPopup(this);"
-+                   oncommand="WebrtcIndicator.menuCommand(event.target);"/>
-+      </toolbarbutton>
-+
-+      <toolbarbutton id="bookmarks-menu-button"
-+                     class="toolbarbutton-1 chromeclass-toolbar-additional"
-+                     persist="class"
-+                     removable="true"
-+                     type="menu"
-+                     label="&bookmarksMenuButton.label;"
-+                     tooltiptext="&bookmarksMenuButton.tooltip;"
-+                     ondragenter="PlacesMenuDNDHandler.onDragEnter(event);"
-+                     ondragover="PlacesMenuDNDHandler.onDragOver(event);"
-+                     ondragleave="PlacesMenuDNDHandler.onDragLeave(event);"
-+                     ondrop="PlacesMenuDNDHandler.onDrop(event);">
-+        <menupopup id="BMB_bookmarksPopup"
-+                   placespopup="true"
-+                   context="placesContext"
-+                   openInTabs="children"
-+                   oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);"
-+                   onclick="BookmarksEventHandler.onClick(event, this.parentNode._placesView);"
-+                   onpopupshowing="BookmarkingUI.onPopupShowing(event);
-+                                   if (!this.parentNode._placesView)
-+                                     new PlacesMenu(event, 'place:folder=BOOKMARKS_MENU');"
-+                   tooltip="bhTooltip" popupsinherittooltip="true">
-+          <menuitem id="BMB_viewBookmarksToolbar"
-+                    placesanonid="view-toolbar"
-+                    toolbarId="PersonalToolbar"
-+                    type="checkbox"
-+                    oncommand="onViewToolbarCommand(event)"
-+                    label="&viewBookmarksToolbar.label;"/>
-+          <menuseparator/>
-+          <menuitem id="BMB_bookmarksShowAll"
-+                    label="&showAllBookmarks2.label;"
-+                    command="Browser:ShowAllBookmarks"
-+                    key="manBookmarkKb"/>
-+          <menuseparator/>
-+          <menuitem id="BMB_bookmarkThisPage"
-+#ifndef XP_MACOSX
-+                    class="menuitem-iconic"
-+#endif
-+                    label="&bookmarkThisPageCmd.label;"
-+                    command="Browser:AddBookmarkAs"
-+                    key="addBookmarkAsKb"/>
-+          <menuitem id="BMB_subscribeToPageMenuitem"
-+#ifndef XP_MACOSX
-+                    class="menuitem-iconic"
-+#endif
-+                    label="&subscribeToPageMenuitem.label;"
-+                    oncommand="return FeedHandler.subscribeToFeed(null, event);"
-+                    onclick="checkForMiddleClick(this, event);"
-+                    observes="singleFeedMenuitemState"/>
-+          <menu id="BMB_subscribeToPageMenupopup"
-+#ifndef XP_MACOSX
-+                class="menu-iconic"
-+#endif
-+                label="&subscribeToPageMenupopup.label;"
-+                observes="multipleFeedsMenuState">
-+            <menupopup id="BMB_subscribeToPageSubmenuMenupopup"
-+                       onpopupshowing="return FeedHandler.buildFeedList(event.target);"
-+                       oncommand="return FeedHandler.subscribeToFeed(null, event);"
-+                       onclick="checkForMiddleClick(this, event);"/>
-+          </menu>
-+          <menuseparator/>
-+          <menu id="BMB_bookmarksToolbar"
-+                placesanonid="toolbar-autohide"
-+                class="menu-iconic bookmark-item"
-+                label="&personalbarCmd.label;"
-+                container="true">
-+            <menupopup id="BMB_bookmarksToolbarPopup"
-+                       placespopup="true"
-+                       context="placesContext"
-+                       onpopupshowing="if (!this.parentNode._placesView)
-+                                         new PlacesMenu(event, 'place:folder=TOOLBAR');"/>
-+          </menu>
-+          <menuseparator/>
-+          <!-- Bookmarks menu items -->
-+          <menuseparator builder="end"
-+                         class="hide-if-empty-places-result"/>
-+          <menuitem id="BMB_unsortedBookmarks"
-+                    label="&bookmarksMenuButton.unsorted.label;"
-+                    oncommand="PlacesCommandHook.showPlacesOrganizer('UnfiledBookmarks');"
-+                    class="menuitem-iconic"/>
-+        </menupopup>
-+      </toolbarbutton>
-+
-+      <toolbarbutton id="home-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
-+                     persist="class" removable="true"
-+                     label="&homeButton.label;"
-+                     ondragover="homeButtonObserver.onDragOver(event)"
-+                     ondragenter="homeButtonObserver.onDragOver(event)"
-+                     ondrop="homeButtonObserver.onDrop(event)"
-+                     ondragexit="homeButtonObserver.onDragExit(event)"
-+                     onclick="BrowserGoHome(event);"
-+                     aboutHomeOverrideTooltip="&abouthome.pageTitle;"/>
-+
-+      <toolbarbutton id="social-share-button"
-+                     class="toolbarbutton-1 chromeclass-toolbar-additional"
-+                     hidden="true"
-+                     label="&sharePageCmd.label;"
-+                     tooltiptext="&sharePageCmd.label;"
-+                     command="Social:SharePage"/>
-+
-+      <toolbaritem id="social-toolbar-item"
-+                   class="chromeclass-toolbar-additional"
-+                   removable="false"
-+                   title="&socialToolbar.title;"
-+                   hidden="true"
-+                   skipintoolbarset="true"
-+                   observes="socialActiveBroadcaster">
-+        <toolbarbutton id="social-notification-icon" class="default-notification-icon toolbarbutton-1 notification-anchor-icon"
-+                   oncommand="PopupNotifications._reshowNotifications(this,
-+                                document.getElementById('social-sidebar-browser'));"/>
-+        <toolbarbutton id="social-provider-button"
-+                       class="toolbarbutton-1"
-+                       type="menu">
-+          <menupopup id="social-statusarea-popup">
-+            <menuitem class="social-statusarea-user menuitem-iconic" pack="start" align="center"
-+                      observes="socialBroadcaster_userDetails"
-+                      oncommand="SocialUI.showProfile(); document.getElementById('social-statusarea-popup').hidePopup();">
-+              <image class="social-statusarea-user-portrait"
-+                     observes="socialBroadcaster_userDetails"/>
-+              <vbox>
-+                <label class="social-statusarea-loggedInStatus"
-+                       observes="socialBroadcaster_userDetails"/>
-+              </vbox>
-+            </menuitem>
-+#ifndef XP_WIN
-+            <menuseparator class="social-statusarea-separator"/>
-+#endif
-+            <menuitem class="social-toggle-sidebar-menuitem"
-+                      type="checkbox"
-+                      autocheck="false"
-+                      command="Social:ToggleSidebar"
-+                      label="&social.toggleSidebar.label;"
-+                      accesskey="&social.toggleSidebar.accesskey;"/>
-+            <menuitem class="social-toggle-notifications-menuitem"
-+                      type="checkbox"
-+                      autocheck="false"
-+                      command="Social:ToggleNotifications"
-+                      label="&social.toggleNotifications.label;"
-+                      accesskey="&social.toggleNotifications.accesskey;"/>
-+            <menuitem class="social-toggle-menuitem" command="Social:Toggle"/>
-+            <menuseparator/>
-+            <menuseparator class="social-provider-menu" hidden="true"/>
-+            <menuitem class="social-addons-menuitem" command="Social:Addons"
-+                      label="&social.addons.label;"/>
-+            <menuitem label="&social.learnMore.label;"
-+                      accesskey="&social.learnMore.accesskey;"
-+                      oncommand="SocialUI.showLearnMore();"/>
-+          </menupopup>
-+        </toolbarbutton>
-+      </toolbaritem>
-+
-+      <hbox id="window-controls" hidden="true" pack="end">
++      <hbox id="window-controls" hidden="true" pack="end" skipintoolbarset="true"
++            ordinal="1000">
 +        <toolbarbutton id="minimize-button"
 +                       tooltiptext="&fullScreenMinimize.tooltip;"
 +                       oncommand="window.minimize();"/>
 +
 +        <toolbarbutton id="restore-button"
++#ifdef XP_MACOSX
++# Prior to 10.7 there wasn't a native fullscreen button so we use #restore-button
++# to exit fullscreen and want it to behave like other toolbar buttons.
++                       class="toolbarbutton-1"
++                       cui-areatype="toolbar"
++#endif
 +                       tooltiptext="&fullScreenRestore.tooltip;"
 +                       oncommand="BrowserFullScreen();"/>
 +
@@ -786,16 +951,23 @@
 +    <toolbarset id="customToolbars" context="toolbar-context-menu"/>
 +
 +    <toolbar id="PersonalToolbar"
-+             mode="icons" iconsize="small" defaulticonsize="small"
-+             lockiconsize="true"
++             mode="icons" iconsize="small"
 +             class="chromeclass-directories"
 +             context="toolbar-context-menu"
 +             defaultset="personal-bookmarks"
 +             toolbarname="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;"
 +             collapsed="true"
 +             customizable="true">
-+      <toolbaritem flex="1" id="personal-bookmarks" title="&bookmarksItem.title;"
++      <toolbaritem id="personal-bookmarks"
++                   flex="1"
++                   title="&bookmarksToolbarItem.label;"
++                   cui-areatype="toolbar"
 +                   removable="true">
++        <toolbarbutton id="bookmarks-toolbar-placeholder"
++                       class="toolbarbutton-1"
++                       mousethrough="never"
++                       label="&bookmarksToolbarItem.label;"
++                       oncommand="PlacesToolbarHelper.onPlaceholderCommand();"/>
 +        <hbox flex="1"
 +              id="PlacesToolbar"
 +              context="placesContext"
@@ -803,11 +975,8 @@
 +              oncommand="BookmarksEventHandler.onCommand(event, this._placesView);"
 +              tooltip="bhTooltip"
 +              popupsinherittooltip="true">
-+          <toolbarbutton class="bookmark-item bookmarks-toolbar-customize"
-+                         mousethrough="never"
-+                         label="&bookmarksToolbarItem.label;"/>
 +          <hbox flex="1">
-+            <hbox align="center">
++            <hbox id="PlacesToolbarDropIndicatorHolder" align="center" collapsed="true">
 +              <image id="PlacesToolbarDropIndicator"
 +                     mousethrough="always"
 +                     collapsed="true"/>
@@ -833,88 +1002,11 @@
 +      </toolbaritem>
 +    </toolbar>
 +
-+#ifdef MENUBAR_CAN_AUTOHIDE
-+#ifndef CAN_DRAW_IN_TITLEBAR
-+#define APPMENU_ON_TABBAR
-+#endif
-+#endif
-+
-+
-+    <toolbar id="TabsToolbar"
-+             class="toolbar-primary"
-+             fullscreentoolbar="true"
-+             customizable="true"
-+             mode="icons" lockmode="true"
-+             iconsize="small" defaulticonsize="small" lockiconsize="true"
-+             aria-label="&tabsToolbar.label;"
-+             context="toolbar-context-menu"
-+#ifdef APPMENU_ON_TABBAR
-+             defaultset="appmenu-toolbar-button,tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton"
-+#else
-+             defaultset="tabbrowser-tabs,new-tab-button,alltabs-button,tabs-closebutton"
-+#endif
-+             collapsed="true">
-+
-+#ifdef APPMENU_ON_TABBAR
-+      <toolbarbutton id="appmenu-toolbar-button"
-+                     class="chromeclass-toolbar-additional"
-+                     type="menu"
-+                     label="&brandShortName;"
-+                     tooltiptext="&appMenuButton.tooltip;">
-+#include browser-appmenu.inc
-+      </toolbarbutton>
-+#endif
-+
-+      <tabs id="tabbrowser-tabs"
-+            class="tabbrowser-tabs"
-+            tabbrowser="content"
-+            flex="1"
-+            setfocus="false"
-+            tooltip="tabbrowser-tab-tooltip"
-+            stopwatchid="FX_TAB_CLICK_MS">
-+        <tab class="tabbrowser-tab" selected="true" fadein="true"/>
-+      </tabs>
-+
-+      <toolbarbutton id="new-tab-button"
-+                     class="toolbarbutton-1 chromeclass-toolbar-additional"
-+                     label="&tabCmd.label;"
-+                     command="cmd_newNavigatorTab"
-+                     onclick="checkForMiddleClick(this, event);"
-+                     tooltiptext="&newTabButton.tooltip;"
-+                     ondrop="newTabButtonObserver.onDrop(event)"
-+                     ondragover="newTabButtonObserver.onDragOver(event)"
-+                     ondragenter="newTabButtonObserver.onDragOver(event)"
-+                     ondragexit="newTabButtonObserver.onDragExit(event)"
-+                     removable="true"/>
-+
-+      <toolbarbutton id="alltabs-button"
-+                     class="toolbarbutton-1 chromeclass-toolbar-additional tabs-alltabs-button"
-+                     type="menu"
-+                     label="&listAllTabs.label;"
-+                     tooltiptext="&listAllTabs.label;"
-+                     removable="true">
-+        <menupopup id="alltabs-popup"
-+                   position="after_end">
-+          <menuitem id="menu_tabview"
-+                    class="menuitem-iconic"
-+                    key="key_tabview"
-+                    label="&viewTabGroups.label;"
-+                    command="Browser:ToggleTabView"
-+                    observes="tabviewGroupsNumber"/>
-+          <menuseparator id="alltabs-popup-separator"/>
-+        </menupopup>
-+      </toolbarbutton>
-+
-+      <toolbarbutton id="tabs-closebutton"
-+                     class="close-button tabs-closebutton"
-+                     command="cmd_close"
-+                     label="&closeTab.label;"
-+                     tooltiptext="&closeTab.label;"/>
-+
-+#ifdef CAN_DRAW_IN_TITLEBAR
-+      <hbox class="titlebar-placeholder" type="appmenu-button" ordinal="0"/>
-+      <hbox class="titlebar-placeholder" type="caption-buttons" ordinal="1000"/>
-+#endif
++    <!-- This is a shim which will go away ASAP. See bug 749804 for details -->
++    <toolbar id="addon-bar" toolbar-delegate="nav-bar" mode="icons" iconsize="small"
++             customizable="true">
++      <hbox id="addonbar-closebutton"/>
++      <statusbar id="status-bar"/>
 +    </toolbar>
 +
 +    <toolbarpalette id="BrowserToolbarPalette">
@@ -923,36 +1015,18 @@
 +# or removing default items with the toolbarbutton-1 class.
 +
 +      <toolbarbutton id="print-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
-+                     label="&printButton.label;" command="cmd_print"
-+                     tooltiptext="&printButton.tooltip;"/>
++#ifdef XP_MACOSX
++                     command="cmd_print" tooltip="dynamic-shortcut-tooltip"
++#else
++                     command="cmd_printPreview" tooltiptext="&printButton.tooltip;"
++#endif
++                     label="&printButton.label;"/>
 +
-+      <!-- This is a placeholder for the Downloads Indicator.  It is visible
-+           during the customization of the toolbar, in the palette, and before
-+           the Downloads Indicator overlay is loaded. -->
-+      <toolbarbutton id="downloads-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
-+                     oncommand="DownloadsIndicatorView.onCommand(event);"
-+                     ondrop="DownloadsIndicatorView.onDrop(event);"
-+                     ondragover="DownloadsIndicatorView.onDragOver(event);"
-+                     ondragenter="DownloadsIndicatorView.onDragOver(event);"
-+                     label="&downloads.label;"
-+                     tooltiptext="&downloads.tooltip;"/>
-+
-+      <toolbarbutton id="history-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
-+                     observes="viewHistorySidebar" label="&historyButton.label;"
-+                     tooltiptext="&historyButton.tooltip;"/>
-+
-+      <toolbarbutton id="bookmarks-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
-+                     observes="viewBookmarksSidebar"
-+                     tooltiptext="&bookmarksButton.tooltip;"
-+                     ondrop="bookmarksButtonObserver.onDrop(event)"
-+                     ondragover="bookmarksButtonObserver.onDragOver(event)"
-+                     ondragenter="bookmarksButtonObserver.onDragOver(event)"
-+                     ondragexit="bookmarksButtonObserver.onDragExit(event)"/>
 +
 +      <toolbarbutton id="new-window-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
 +                     label="&newNavigatorCmd.label;"
 +                     command="key_newNavigator"
-+                     tooltiptext="&newWindowButton.tooltip;"
++                     tooltip="dynamic-shortcut-tooltip"
 +                     ondrop="newWindowButtonObserver.onDrop(event)"
 +                     ondragover="newWindowButtonObserver.onDragOver(event)"
 +                     ondragenter="newWindowButtonObserver.onDragOver(event)"
@@ -962,48 +1036,7 @@
 +                     observes="View:FullScreen"
 +                     type="checkbox"
 +                     label="&fullScreenCmd.label;"
-+                     tooltiptext="&fullScreenButton.tooltip;"/>
-+
-+      <toolbaritem id="zoom-controls" class="chromeclass-toolbar-additional"
-+                   title="&zoomControls.label;">
-+        <toolbarbutton id="zoom-out-button" class="toolbarbutton-1"
-+                       label="&fullZoomReduceCmd.label;"
-+                       command="cmd_fullZoomReduce"
-+                       tooltiptext="&zoomOutButton.tooltip;"/>
-+        <toolbarbutton id="zoom-in-button" class="toolbarbutton-1"
-+                       label="&fullZoomEnlargeCmd.label;"
-+                       command="cmd_fullZoomEnlarge"
-+                       tooltiptext="&zoomInButton.tooltip;"/>
-+      </toolbaritem>
-+
-+      <toolbarbutton id="feed-button"
-+                     type="menu"
-+                     class="toolbarbutton-1 chromeclass-toolbar-additional"
-+                     disabled="true"
-+                     label="&feedButton.label;"
-+                     tooltiptext="&feedButton.tooltip;"
-+                     onclick="return FeedHandler.onFeedButtonClick(event);">
-+        <menupopup position="after_end"
-+                   id="feed-menu"
-+                   onpopupshowing="return FeedHandler.buildFeedList(this);"
-+                   oncommand="return FeedHandler.subscribeToFeed(null, event);"
-+                   onclick="checkForMiddleClick(this, event);"/>
-+      </toolbarbutton>
-+
-+      <toolbarbutton id="cut-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
-+                     label="&cutCmd.label;"
-+                     command="cmd_cut"
-+                     tooltiptext="&cutButton.tooltip;"/>
-+
-+      <toolbarbutton id="copy-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
-+                     label="&copyCmd.label;"
-+                     command="cmd_copy"
-+                     tooltiptext="&copyButton.tooltip;"/>
-+
-+      <toolbarbutton id="paste-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
-+                     label="&pasteCmd.label;"
-+                     command="cmd_paste"
-+                     tooltiptext="&pasteButton.tooltip;"/>
++                     tooltip="dynamic-shortcut-tooltip"/>
 +
 +#ifdef MOZ_SERVICES_SYNC
 +      <toolbarbutton id="sync-button"
@@ -1012,61 +1045,92 @@
 +                     oncommand="gSyncUI.handleToolbarButton()"/>
 +#endif
 +
-+      <toolbaritem id="navigator-throbber" title="&throbberItem.title;" align="center" pack="center"
-+                   mousethrough="always">
-+        <image/>
-+      </toolbaritem>
-+
 +      <toolbarbutton id="tabview-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
 +                     label="&tabGroupsButton.label;"
 +                     command="Browser:ToggleTabView"
-+                     tooltiptext="&tabGroupsButton.tooltip;"
++                     tooltip="dynamic-shortcut-tooltip"
 +                     observes="tabviewGroupsNumber"/>
 +    </toolbarpalette>
 +  </toolbox>
 +
 +  <hbox id="fullscr-toggler" collapsed="true"/>
 +
-+  <hbox flex="1" id="browser">
-+    <vbox id="browser-border-start" hidden="true" layer="true"/>
-+    <vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
-+      <sidebarheader id="sidebar-header" align="center">
-+        <label id="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/>
-+        <image id="sidebar-throbber"/>
-+        <toolbarbutton class="tabs-closebutton" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="toggleSidebar();"/>
-+      </sidebarheader>
-+      <browser id="sidebar" flex="1" autoscroll="false" disablehistory="true"
-+                style="min-width: 14em; width: 18em; max-width: 36em;"/>
-+    </vbox>
++  <deck id="content-deck" flex="1">
++    <hbox flex="1" id="browser">
++      <vbox id="browser-border-start" hidden="true" layer="true"/>
++      <vbox id="sidebar-box" hidden="true" class="chromeclass-extrachrome">
++        <sidebarheader id="sidebar-header" align="center">
++          <label id="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/>
++          <image id="sidebar-throbber"/>
++          <toolbarbutton class="tabs-closebutton close-icon" tooltiptext="&sidebarCloseButton.tooltip;" oncommand="toggleSidebar();"/>
++        </sidebarheader>
++        <browser id="sidebar" flex="1" autoscroll="false" disablehistory="true"
++                  style="min-width: 14em; width: 18em; max-width: 36em;"/>
++      </vbox>
++
++      <splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/>
++      <vbox id="appcontent" flex="1">
++        <tabbrowser id="content"
++                    flex="1" contenttooltip="aHTMLTooltip"
++                    tabcontainer="tabbrowser-tabs"
++                    contentcontextmenu="contentAreaContextMenu"
++                    autocompletepopup="PopupAutoComplete"
++                    selectpopup="ContentSelectDropdown"
++                    onclick="contentAreaClick(event, false);"/>
++        <chatbar id="pinnedchats" layer="true" mousethrough="always" hidden="true"/>
++      </vbox>
++      <splitter id="social-sidebar-splitter"
++                class="chromeclass-extrachrome sidebar-splitter"
++                observes="socialSidebarBroadcaster"/>
++      <vbox id="social-sidebar-box"
++            class="chromeclass-extrachrome"
++            observes="socialSidebarBroadcaster"
++            persist="width">
 +
-+    <splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/>
-+    <vbox id="appcontent" flex="1">
-+      <tabbrowser id="content"
-+                  flex="1" contenttooltip="aHTMLTooltip"
-+                  tabcontainer="tabbrowser-tabs"
-+                  contentcontextmenu="contentAreaContextMenu"
-+                  autocompletepopup="PopupAutoComplete"
-+                  selectpopup="ContentSelectDropdown"/>
-+      <chatbar id="pinnedchats" layer="true" mousethrough="always" hidden="true"/>
-+    </vbox>
-+    <splitter id="social-sidebar-splitter"
-+              class="chromeclass-extrachrome sidebar-splitter"
-+              observes="socialSidebarBroadcaster"/>
-+    <vbox id="social-sidebar-box"
-+          class="chromeclass-extrachrome"
-+          observes="socialSidebarBroadcaster"
-+          persist="width">
-+      <browser id="social-sidebar-browser"
-+               type="content"
-+               context="contentAreaContextMenu"
-+               disableglobalhistory="true"
-+               tooltip="aHTMLTooltip"
-+               popupnotificationanchor="social-notification-icon"
-+               flex="1"
-+               style="min-width: 14em; width: 18em; max-width: 36em;"/>
-+    </vbox>
-+    <vbox id="browser-border-end" hidden="true" layer="true"/>
-+  </hbox>
++        <sidebarheader id="social-sidebar-header" class="sidebar-header" align="center">
++          <image id="social-sidebar-favico"/>
++          <label id="social-sidebar-title" class="sidebar-title" persist="value" flex="1" crop="end" control="sidebar"/>
++          <toolbarbutton id="social-sidebar-button"
++                         class="toolbarbutton-1"
++                         type="menu">
++            <menupopup id="social-statusarea-popup" position="after_end">
++              <menuitem class="social-toggle-sidebar-menuitem"
++                        type="checkbox"
++                        autocheck="false"
++                        command="Social:ToggleSidebar"
++                        label="&social.toggleSidebar.label;"
++                        accesskey="&social.toggleSidebar.accesskey;"/>
++              <menuitem class="social-toggle-notifications-menuitem"
++                        type="checkbox"
++                        autocheck="false"
++                        command="Social:ToggleNotifications"
++                        label="&social.toggleNotifications.label;"
++                        accesskey="&social.toggleNotifications.accesskey;"/>
++              <menuitem class="social-toggle-menuitem" command="Social:Toggle"/>
++              <menuseparator/>
++              <menuseparator class="social-provider-menu" hidden="true"/>
++              <menuitem class="social-addons-menuitem" command="Social:Addons"
++                        label="&social.addons.label;"/>
++              <menuitem label="&social.learnMore.label;"
++                        accesskey="&social.learnMore.accesskey;"
++                        oncommand="SocialUI.showLearnMore();"/>
++            </menupopup>
++          </toolbarbutton>
++        </sidebarheader>
++
++        <browser id="social-sidebar-browser"
++                 type="content"
++                 context="contentAreaContextMenu"
++                 disableglobalhistory="true"
++                 tooltip="aHTMLTooltip"
++                 popupnotificationanchor="social-sidebar-favico"
++                 flex="1"
++                 style="min-width: 14em; width: 18em; max-width: 36em;"/>
++      </vbox>
++      <vbox id="browser-border-end" hidden="true" layer="true"/>
++    </hbox>
++#include ../../components/customizableui/content/customizeMode.inc.xul
++  </deck>
 +
 +  <hbox id="full-screen-warning-container" hidden="true" fadeout="true">
 +    <hbox style="width: 100%;" pack="center"> <!-- Inner hbox needed due to bug 579776. -->
@@ -1122,56 +1186,28 @@
 +                         tooltiptext="&devToolbarCloseButton.tooltiptext;"/>
 +#endif
 +   </toolbar>
-+
-+    <toolbar id="addon-bar"
-+             toolbarname="&addonBarCmd.label;" accesskey="&addonBarCmd.accesskey;"
-+             collapsed="true"
-+             class="toolbar-primary chromeclass-toolbar"
-+             context="toolbar-context-menu" toolboxid="navigator-toolbox"
-+             mode="icons" iconsize="small" defaulticonsize="small"
-+             lockiconsize="true"
-+             defaultset="addonbar-closebutton,spring,status-bar"
-+             customizable="true"
-+             key="key_toggleAddonBar">
-+      <toolbarbutton id="addonbar-closebutton"
-+                     tooltiptext="&addonBarCloseButton.tooltip;"
-+                     oncommand="setToolbarVisibility(this.parentNode, false);"/>
-+      <statusbar id="status-bar" ordinal="1000"/>
-+    </toolbar>
 +  </vbox>
 +
++  <svg:svg height="0">
++#include tab-shape.inc.svg
++
 +#ifndef XP_UNIX
-+  <svg:svg height="0">
-+    <svg:clipPath id="windows-keyhole-forward-clip-path" clipPathUnits="objectBoundingBox">
-+      <svg:path d="M 0,0 C 0.16,0.11 0.28,0.29 0.28,0.5 0.28,0.71 0.16,0.89 0,1 L 1,1 1,0 0,0 z"/>
++    <svg:clipPath id="windows-keyhole-forward-clip-path" clipPathUnits="userSpaceOnUse">
++      <svg:path d="M 0,0 a 16 16 0 0 1 0,24 l 10000,0 l 0,-24 l -10000,0 z"/>
 +    </svg:clipPath>
 +    <svg:clipPath id="windows-urlbar-back-button-clip-path" clipPathUnits="userSpaceOnUse">
-+      <svg:path d="M 0,0 0,7.8 C 2.5,11 4,14 4,18 4,22 2.5,25 0,28 l 0,22 10000,0 0,-50 L 0,0 z"/>
++      <svg:path d="M -1,1 a 16 16 0 0 1 0,24 l 10000,0 l 0,-24 l -10000,0 z"/>
 +    </svg:clipPath>
-+  </svg:svg>
 +#endif
 +#ifdef XP_MACOSX
-+  <svg:svg height="0">
-+    <svg:clipPath id="osx-keyhole-forward-clip-path" clipPathUnits="objectBoundingBox">
-+      <svg:path d="M 0,0 C 0.15,0.12 0.25,0.3 0.25,0.5 0.25,0.7 0.15,0.88 0,1 L 1,1 1,0 0,0 z"/>
++    <svg:clipPath id="osx-keyhole-forward-clip-path" clipPathUnits="userSpaceOnUse">
++      <svg:path d="M 0,0 a 16 16 0 0 1 0,24 l 10000,0 l 0,-24 l -10000,0 z"/>
 +    </svg:clipPath>
 +    <svg:clipPath id="osx-urlbar-back-button-clip-path" clipPathUnits="userSpaceOnUse">
-+      <svg:path d="m 0,-5 0,4.03 C 3.6,1.8 6,6.1 6,11 6,16 3.6,20 0,23 l 0,27 10000,0 0,-55 L 0,-5 z"/>
-+    </svg:clipPath>
-+    <svg:clipPath id="osx-tab-ontop-left-curve-clip-path" clipPathUnits="userSpaceOnUse">
-+      <svg:path d="M 9,0 C 7.3,0 6,1.3 6,3 l 0,14 c 0,3 -2.2,5 -5,5 l -1,0 0,1 12,0 0,-1 0,-19 0,-3 -3,0 z"/>
-+    </svg:clipPath>
-+    <svg:clipPath id="osx-tab-ontop-right-curve-clip-path" clipPathUnits="userSpaceOnUse">
-+      <svg:path d="m 0,0 0,3 0,19 0,1 12,0 0,-1 -1,0 C 8.2,22 6,20 6,17 L 6,3 C 6,1.3 4.7,0 3,0 L 0,0 z"/>
++      <svg:path d="M -12,-5 a 16 16 0 0 1 0,34 l 10000,0 l 0,-34 l -10000,0 z"/>
 +    </svg:clipPath>
-+    <svg:clipPath id="osx-tab-onbottom-left-curve-clip-path" clipPathUnits="userSpaceOnUse">
-+      <svg:path d="m 0,0 0,1 1,0 c 2.8,0 5,2.2 5,5 l 0,14 c 0,2 1.3,3 3,3 l 3,0 0,-3 L 12,1 12,0 0,0 z"/>
-+    </svg:clipPath>
-+    <svg:clipPath id="osx-tab-onbottom-right-curve-clip-path" clipPathUnits="userSpaceOnUse">
-+      <svg:path d="m 0,0 0,1 0,19 0,3 3,0 c 1.7,0 3,-1 3,-3 L 6,6 C 6,3.2 8.2,1 11,1 L 12,1 12,0 0,0 z"/>
-+    </svg:clipPath>
++#endif
 +  </svg:svg>
-+#endif
 +
 +</vbox>
 +# <iframe id="tab-view"> is dynamically appended as the 2nd child of #tab-view-deck.
@@ -1183,11 +1219,11 @@
 diff --git a/browser/base/jar.mn b/browser/base/jar.mn
 --- a/browser/base/jar.mn
 +++ b/browser/base/jar.mn
-@@ -53,16 +53,18 @@ browser.jar:
- #endif
+@@ -66,16 +66,18 @@ browser.jar:
          content/browser/aboutRobots-icon.png          (content/aboutRobots-icon.png)
          content/browser/aboutRobots-widget-left.png   (content/aboutRobots-widget-left.png)
          content/browser/aboutSocialError.xhtml        (content/aboutSocialError.xhtml)
+         content/browser/aboutTabCrashed.js            (content/aboutTabCrashed.js)
          content/browser/aboutTabCrashed.xhtml         (content/aboutTabCrashed.xhtml)
  *       content/browser/browser.css                   (content/browser.css)
  *       content/browser/browser.js                    (content/browser.js)
@@ -1765,7 +1801,7 @@
 diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
 --- a/browser/installer/package-manifest.in
 +++ b/browser/installer/package-manifest.in
-@@ -640,19 +640,21 @@
+@@ -654,19 +654,21 @@
  @BINPATH@/defaults/autoconfig/prefcalls.js
  @BINPATH@/browser/defaults/profile/prefs.js
  
--- a/firefox-no-default-ualocale.patch	Sun Apr 13 16:54:09 2014 +0200
+++ b/firefox-no-default-ualocale.patch	Mon Apr 14 09:09:11 2014 +0200
@@ -1,18 +1,18 @@
 # HG changeset patch
 # User Wolfgang Rosenauer <wr@rosenauer.org>
-# Parent 5c1cb20bb3ad68c77841909461700cbb11707708
+# Parent 5ffbb37bbfc52f549620ff67ce45f218a825cf4e
 Do not overwrite the locale dynamic pref from xulrunner's all.js with a wrong default value
 
 diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
 --- a/browser/app/profile/firefox.js
 +++ b/browser/app/profile/firefox.js
-@@ -246,17 +246,17 @@ pref("lightweightThemes.update.enabled",
- pref("browser.uitour.enabled", false);
- pref("browser.uitour.requireSecure", true);
- pref("browser.uitour.themeOrigin", "https://addons.mozilla.org/%LOCALE%/firefox/themes/");
- pref("browser.uitour.pinnedTabUrl", "https://support.mozilla.org/%LOCALE%/kb/pinned-tabs-keep-favorite-websites-open");
+@@ -253,17 +253,17 @@ pref("browser.uitour.pinnedTabUrl", "htt
+ pref("browser.uitour.url", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/tour/");
  pref("browser.uitour.whitelist.add.260", "www.mozilla.org,support.mozilla.org");
  
+ pref("browser.customizemode.tip0.shown", false);
+ pref("browser.customizemode.tip0.learnMoreUrl", "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/customize");
+ 
  pref("keyword.enabled", true);
  
 -pref("general.useragent.locale", "@AB_CD@");
--- a/mozilla-aarch64-599882cfb998.diff	Sun Apr 13 16:54:09 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-
-diff --git a/js/src/assembler/wtf/Platform.h b/js/src/assembler/wtf/Platform.h
---- a/js/src/assembler/wtf/Platform.h
-+++ b/js/src/assembler/wtf/Platform.h
-@@ -205,16 +205,23 @@
- #endif
- 
- /* WTF_CPU_S390 - S390 32-bit */
- #if defined(__s390__)
- #define WTF_CPU_S390 1
- #define WTF_CPU_BIG_ENDIAN 1
- #endif
- 
-+#if defined(__aarch64__)
-+#define WTF_CPU_AARCH64 1
-+#if defined(__AARCH64EB__)
-+#define WTF_CPU_BIG_ENDIAN 1
-+#endif
-+#endif
-+
- /* WTF_CPU_X86 - i386 / x86 32-bit */
- #if   defined(__i386__) \
-     || defined(i386)     \
-     || defined(_M_IX86)  \
-     || defined(_X86_)    \
-     || defined(__THW_INTEL)
- #define WTF_CPU_X86 1
- #endif
-
-
-
-
--- a/mozilla-aarch64-bmo-963028.patch	Sun Apr 13 16:54:09 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-
-# HG changeset patch
-# User Marcin Juszkiewicz <mjuszkiewicz@redhat.com>
-# Date 1390512871 18000
-# Node ID feaf8bd56a82749f5d0d8869b7c0a1c01e300362
-# Parent  2a082f03cd1d64c8bfff9641284f2dc23617f806
-Bug 963028 - AArch64 support for jemalloc. r=froydnj
-
-diff --git a/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in b/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in
---- a/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in
-+++ b/memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in
-@@ -283,16 +283,19 @@ static const bool config_ivsalloc =
- #    define LG_QUANTUM		4
- #  endif
- #  ifdef __SH4__
- #    define LG_QUANTUM		4
- #  endif
- #  ifdef __tile__
- #    define LG_QUANTUM		4
- #  endif
-+#  ifdef __aarch64__
-+#    define LG_QUANTUM		4
-+#  endif
- #  ifndef LG_QUANTUM
- #    error "No LG_QUANTUM definition for architecture; specify via CPPFLAGS"
- #  endif
- #endif
- 
- #define	QUANTUM			((size_t)(1U << LG_QUANTUM))
- #define	QUANTUM_MASK		(QUANTUM - 1)
- 
-diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c
---- a/memory/mozjemalloc/jemalloc.c
-+++ b/memory/mozjemalloc/jemalloc.c
-@@ -1097,17 +1097,17 @@ static unsigned		ncpus;
- /*
-  * VM page size. It must divide the runtime CPU page size or the code
-  * will abort.
-  * Platform specific page size conditions copied from js/public/HeapAPI.h
-  */
- #if (defined(SOLARIS) || defined(__FreeBSD__)) && \
-     (defined(__sparc) || defined(__sparcv9) || defined(__ia64))
- #define pagesize_2pow			((size_t) 13)
--#elif defined(__powerpc64__)
-+#elif defined(__powerpc64__) || defined(__aarch64__)
- #define pagesize_2pow			((size_t) 16)
- #else
- #define pagesize_2pow			((size_t) 12)
- #endif
- #define pagesize			((size_t) 1 << pagesize_2pow)
- #define pagesize_mask			(pagesize - 1)
- 
- /* Various quantum-related settings. */
-
--- a/mozilla-aarch64-bmo-963029.patch	Sun Apr 13 16:54:09 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-
-# HG changeset patch
-# User Marcin Juszkiewicz <mjuszkiewicz@redhat.com>
-# Date 1390512871 18000
-# Node ID 89e06a821ad5986035de99c8bc1f9d7a99541b2a
-# Parent  feaf8bd56a82749f5d0d8869b7c0a1c01e300362
-Bug 963029 - AArch64 support for MFBT. r=froydnj
-
-Index: mozilla/mfbt/Endian.h
-===================================================================
---- mozilla.orig/mfbt/Endian.h
-+++ mozilla/mfbt/Endian.h
-@@ -121,14 +121,14 @@
- #elif defined(__sparc) || defined(__sparc__) || \
-       defined(_POWER) || defined(__hppa) || \
-       defined(_MIPSEB) || defined(__ARMEB__) || \
--      defined(__s390__) || \
-+      defined(__s390__) || defined(__AARCH64EB__) || \
-       (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
-       (defined(__ia64) && defined(__BIG_ENDIAN__))
- #  define MOZ_BIG_ENDIAN 1
- #elif defined(__i386) || defined(__i386__) || \
-       defined(__x86_64) || defined(__x86_64__) || \
-       defined(_MIPSEL) || defined(__ARMEL__) || \
--      defined(__alpha__) || \
-+      defined(__alpha__) || defined(__AARCH64EL__) ||  \
-       (defined(__sh__) && defined(__BIG_ENDIAN__)) || \
-       (defined(__ia64) && !defined(__BIG_ENDIAN__))
- #  define MOZ_LITTLE_ENDIAN 1
-Index: mozilla/mfbt/tests/TestPoisonArea.cpp
-===================================================================
---- mozilla.orig/mfbt/tests/TestPoisonArea.cpp
-+++ mozilla/mfbt/tests/TestPoisonArea.cpp
-@@ -161,6 +161,9 @@
- #elif defined __s390__
- #define RETURN_INSTR 0x07fe0000 /* br %r14 */
- 
-+#elif defined __aarch64__
-+#define RETURN_INSTR 0xd65f03c0 /* ret */
-+
- #elif defined __ia64
- struct ia64_instr { uint32_t i[4]; };
- static const ia64_instr _return_instr =
--- a/mozilla-aarch64-bmo-963030.patch	Sun Apr 13 16:54:09 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-
-# HG changeset patch
-# User Marcin Juszkiewicz <mjuszkiewicz@redhat.com>
-# Date 1391033256 18000
-# Node ID 8a76622ce10d83a9dd070b968367efd8e73dc7cc
-# Parent  d890e603d751c465f2a0e2d2221e033b32afe4a9
-Bug 963030 - AArch64 support for IPC. r=bsmedberg
-
-diff --git a/ipc/chromium/src/build/build_config.h b/ipc/chromium/src/build/build_config.h
---- a/ipc/chromium/src/build/build_config.h
-+++ b/ipc/chromium/src/build/build_config.h
-@@ -97,16 +97,19 @@
- #define ARCH_CPU_S390X 1
- #define ARCH_CPU_64_BITS 1
- #elif defined(__s390__)
- #define ARCH_CPU_S390 1
- #define ARCH_CPU_32_BITS 1
- #elif defined(__alpha__)
- #define ARCH_CPU_ALPHA 1
- #define ARCH_CPU_64_BITS 1
-+#elif defined(__aarch64__)
-+#define ARCH_CPU_AARCH64 1
-+#define ARCH_CPU_64_BITS 1
- #else
- #error Please add support for your architecture in build/build_config.h
- #endif
- 
- // Type detection for wchar_t.
- #if defined(OS_WIN)
- #define WCHAR_T_IS_UTF16
- #else
-
--- a/mozilla-aarch64-bmo-963031.patch	Sun Apr 13 16:54:09 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-
-# HG changeset patch
-# User Marcin Juszkiewicz <mjuszkiewicz@redhat.com>
-# Date 1390828707 18000
-# Node ID 01c406c513473eef5c98940ba8d3040c456044d8
-# Parent  b781647898f4a82e6cdeeb907ebbc402545698db
-Bug 963031 - AArch support for Graphics. r=doublec
-
-diff --git a/gfx/ycbcr/chromium_types.h b/gfx/ycbcr/chromium_types.h
---- a/gfx/ycbcr/chromium_types.h
-+++ b/gfx/ycbcr/chromium_types.h
-@@ -41,13 +41,17 @@ typedef uint32_t uint32;
- #elif defined(__sparc)
- #define ARCH_CPU_SPARC_FAMILY 1
- #define ARCH_CPU_SPARC 1
- #define ARCH_CPU_32_BITS 1
- #elif defined(__sparcv9)
- #define ARCH_CPU_SPARC_FAMILY 1
- #define ARCH_CPU_SPARC 1
- #define ARCH_CPU_64_BITS 1
-+#elif defined(__aarch64__)
-+#define ARCH_CPU_AARCH64_FAMILY 1
-+#define ARCH_CPU_AARCH64 1
-+#define ARCH_CPU_64_BITS 1
- #else
- #warning Please add support for your architecture in chromium_types.h
- #endif
- 
- #endif // GFX_CHROMIUMTYPES_H
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mozilla-icu-strncat.patch	Mon Apr 14 09:09:11 2014 +0200
@@ -0,0 +1,35 @@
+# HG changeset patch
+# Parent 29be2a4daa0f512d22bde85b97b5460839026571
+# User Wolfgang Rosenauer <wr@rosenauer.org>
+From: Jan Engelhardt <jengelh@inai.de>
+Reference: http://bugs.icu-project.org/trac/ticket/7808
+
+diff --git a/intl/icu/source/tools/pkgdata/pkgdata.cpp b/intl/icu/source/tools/pkgdata/pkgdata.cpp
+--- a/intl/icu/source/tools/pkgdata/pkgdata.cpp
++++ b/intl/icu/source/tools/pkgdata/pkgdata.cpp
+@@ -1975,22 +1975,22 @@ static void loadLists(UPKGOptions *o, UE
+     FILE *p = NULL;
+     size_t n;
+     static char buf[512] = "";
+     char cmdBuf[1024];
+     UErrorCode status = U_ZERO_ERROR;
+     const char cmd[] = "icu-config --incpkgdatafile";
+ 
+     /* #1 try the same path where pkgdata was called from. */
+-    findDirname(progname, cmdBuf, 1024, &status);
++    findDirname(progname, cmdBuf, sizeof(cmdBuf), &status);
+     if(U_SUCCESS(status)) {
+       if (cmdBuf[0] != 0) {
+-          uprv_strncat(cmdBuf, U_FILE_SEP_STRING, 1024);
++          uprv_strncat(cmdBuf, U_FILE_SEP_STRING, sizeof(cmdBuf)-1-strlen(cmdBuf));
+       }
+-      uprv_strncat(cmdBuf, cmd, 1024);
++      uprv_strncat(cmdBuf, cmd, sizeof(cmdBuf)-1-strlen(cmdBuf));
+       
+       if(verbose) {
+         fprintf(stdout, "# Calling icu-config: %s\n", cmdBuf);
+       }
+       p = popen(cmdBuf, "r");
+     }
+ 
+     if(p == NULL || (n = fread(buf, 1, 511, p)) <= 0) {
--- a/mozilla-idldir.patch	Sun Apr 13 16:54:09 2014 +0200
+++ b/mozilla-idldir.patch	Mon Apr 14 09:09:11 2014 +0200
@@ -1,20 +1,24 @@
 # HG changeset patch
-# Parent afc2e938b32548c127b2627045e0222b40d605a5
+# Parent 1cd1e78dfe63c1a7bcfc0707697bb99bcfea19c4
 # User Wolfgang Rosenauer <wr@rosenauer.org>
 Install IDL files to includedir instead of /usr/share/idl
 
 diff --git a/config/baseconfig.mk b/config/baseconfig.mk
 --- a/config/baseconfig.mk
 +++ b/config/baseconfig.mk
-@@ -1,10 +1,10 @@
+@@ -1,14 +1,14 @@
+ # This file is normally included by autoconf.mk, but it is also used
+ # directly in python/mozbuild/mozbuild/base.py for gmake validation.
+ # We thus use INCLUDED_AUTOCONF_MK to enable/disable some parts depending
+ # whether a normal build is happening or whether the check is running.
  includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
 -idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
 +idldir = $(includedir)
  installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
  sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
- DIST = $(DEPTH)/dist
- 
- # We do magic with OBJ_SUFFIX in config.mk, the following ensures we don't
- # manually use it before config.mk inclusion
- _OBJ_SUFFIX := $(OBJ_SUFFIX)
- OBJ_SUFFIX = $(error config/config.mk needs to be included before using OBJ_SUFFIX)
+ ifndef TOP_DIST
+ TOP_DIST = dist
+ endif
+ ifneq (,$(filter /%,$(TOP_DIST)))
+ DIST = $(TOP_DIST)
+ else
--- a/mozilla-kde.patch	Sun Apr 13 16:54:09 2014 +0200
+++ b/mozilla-kde.patch	Mon Apr 14 09:09:11 2014 +0200
@@ -44,7 +44,7 @@
  #include "prefread.h"
  #include "prefapi_private_data.h"
  
-@@ -1115,16 +1116,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
+@@ -1113,16 +1114,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
  
  static nsresult pref_LoadPrefsInDirList(const char *listId)
  {
@@ -62,7 +62,7 @@
 +
 +  if (nsKDEUtils::kdeSession()) {
 +    for(int i = 0;
-+        i < NS_ARRAY_LENGTH(specialFiles);
++        i < MOZ_ARRAY_LENGTH(specialFiles);
 +        ++i ) {
 +      if (*specialFiles[ i ] == '\0') {
 +        specialFiles[ i ] = "kde.js";
@@ -79,7 +79,7 @@
      return NS_OK;
  
    bool hasMore;
-@@ -1140,17 +1159,17 @@ static nsresult pref_LoadPrefsInDirList(
+@@ -1138,17 +1157,17 @@ static nsresult pref_LoadPrefsInDirList(
  
      nsAutoCString leaf;
      path->GetNativeLeafName(leaf);
@@ -89,7 +89,7 @@
        ReadExtensionPrefs(path);
      else
 -      pref_LoadPrefsInDir(path, nullptr, 0);
-+      pref_LoadPrefsInDir(path, specialFiles, NS_ARRAY_LENGTH(specialFiles));
++      pref_LoadPrefsInDir(path, specialFiles, MOZ_ARRAY_LENGTH(specialFiles));
    }
    return NS_OK;
  }
@@ -98,7 +98,7 @@
  {
    nsZipItemPtr<char> manifest(jarReader, name, true);
    NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
-@@ -1244,28 +1263,40 @@ static nsresult pref_InitInitialObjects(
+@@ -1242,28 +1261,40 @@ static nsresult pref_InitInitialObjects(
    /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
    static const char* specialFiles[] = {
  #if defined(XP_MACOSX)
@@ -122,7 +122,7 @@
  
 +  if(nsKDEUtils::kdeSession()) { // TODO what if some setup actually requires the helper?
 +    for(int i = 0;
-+        i < NS_ARRAY_LENGTH(specialFiles);
++        i < MOZ_ARRAY_LENGTH(specialFiles);
 +        ++i ) {
 +      if( *specialFiles[ i ] == '\0' ) {
 +        specialFiles[ i ] = "kde.js";
@@ -270,7 +270,7 @@
 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
 --- a/toolkit/content/jar.mn
 +++ b/toolkit/content/jar.mn
-@@ -53,29 +53,33 @@ toolkit.jar:
+@@ -55,29 +55,33 @@ toolkit.jar:
     content/global/viewZoomOverlay.js          (viewZoomOverlay.js)
  *+ content/global/bindings/autocomplete.xml    (widgets/autocomplete.xml)
     content/global/bindings/browser.xml         (widgets/browser.xml)
@@ -764,7 +764,7 @@
 new file mode 100644
 --- /dev/null
 +++ b/toolkit/content/widgets/preferences-kde.xml
-@@ -0,0 +1,1332 @@
+@@ -0,0 +1,1334 @@
 +<?xml version="1.0"?>
 +
 +<!DOCTYPE bindings [
@@ -1350,15 +1350,14 @@
 +        <xul:button dlgtype="cancel" class="dialog-button" icon="cancel"/>
 +        <xul:button dlgtype="accept" class="dialog-button" icon="accept"/>
 +#elif XP_UNIX
-+	        pack="end">
-+        <xul:button dlgtype="help" class="dialog-button" hidden="true" icon="help"/>
-+        <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
-+        <xul:spacer anonid="spacer" flex="1"/>
-+        <xul:button dlgtype="accept" class="dialog-button" icon="accept"/>
-+        <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/>
-+        <xul:button dlgtype="cancel" class="dialog-button" icon="cancel"/>
-+        <xul:button dlgtype="disclosure" class="dialog-button" hidden="true"/>
-+	
++                pack="end">
++	<xul:button dlgtype="help" class="dialog-button" hidden="true" icon="help"/>
++	<xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
++	<xul:spacer anonid="spacer" flex="1"/>
++	<xul:button dlgtype="accept" class="dialog-button" icon="accept"/>
++	<xul:button dlgtype="extra1" class="dialog-button" hidden="true"/>
++	<xul:button dlgtype="cancel" class="dialog-button" icon="cancel"/>
++	<xul:button dlgtype="disclosure" class="dialog-button" hidden="true"/>
 +#else
 +                pack="end">
 +        <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
@@ -1808,9 +1807,10 @@
 +    <handlers>
 +      <handler event="dialogaccept">
 +      <![CDATA[
-+        if (!this._fireEvent("beforeaccept", this)) 
-+          return;
-+        
++        if (!this._fireEvent("beforeaccept", this)){
++          return false;
++        }
++
 +        if (this.type == "child" && window.opener) {
 +          var psvc = Components.classes["@mozilla.org/preferences-service;1"]
 +                               .getService(Components.interfaces.nsIPrefBranch);
@@ -1873,6 +1873,8 @@
 +                               .getService(Components.interfaces.nsIPrefService);
 +          psvc.savePrefFile(null);
 +        }
++
++        return true;
 +      ]]>
 +      </handler>
 +      <handler event="command">
@@ -2617,7 +2619,7 @@
 +++ b/uriloader/exthandler/Makefile.in
 @@ -19,9 +19,10 @@ endif
  ifdef MOZ_ENABLE_DBUS
- LOCAL_INCLUDES   += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS)
+ OS_INCLUDES   += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS)
  endif
  
  include $(topsrcdir)/config/rules.mk
@@ -3029,7 +3031,7 @@
  #endif
  }
  
- nsresult nsOSHelperAppService::GetFileTokenForPath(const PRUnichar * platformAppPath, nsIFile ** aFile)
+ nsresult nsOSHelperAppService::GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile)
  {
 @@ -1263,17 +1263,17 @@ nsOSHelperAppService::GetFromExtension(c
                                           mime_types_description,
@@ -3072,14 +3074,14 @@
 diff --git a/widget/gtk/Makefile.in b/widget/gtk/Makefile.in
 --- a/widget/gtk/Makefile.in
 +++ b/widget/gtk/Makefile.in
-@@ -4,11 +4,13 @@
+@@ -3,11 +3,13 @@
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  
  include $(topsrcdir)/config/rules.mk
  
  CFLAGS          += $(MOZ_STARTUP_NOTIFICATION_CFLAGS)
- CXXFLAGS        += $(MOZ_CAIRO_CFLAGS) $(MOZ_PIXMAN_CFLAGS) \
- 		               $(MOZ_STARTUP_NOTIFICATION_CFLAGS)
+ CXXFLAGS        += $(MOZ_CAIRO_CFLAGS) $(MOZ_STARTUP_NOTIFICATION_CFLAGS)
  
 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
 +
@@ -3452,7 +3454,7 @@
 diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp
 --- a/xpcom/components/ManifestParser.cpp
 +++ b/xpcom/components/ManifestParser.cpp
-@@ -30,16 +30,17 @@
+@@ -31,16 +31,17 @@
  #include "nsTextFormatter.h"
  #include "nsVersionComparator.h"
  #include "nsXPCOMCIDInternal.h"
@@ -3470,7 +3472,7 @@
    const char* directive;
    int argc;
  
-@@ -397,16 +398,17 @@ ParseManifest(NSLocationType type, FileL
+@@ -398,16 +399,17 @@ ParseManifest(NSLocationType type, FileL
    NS_NAMED_LITERAL_STRING(kPlatform, "platform");
    NS_NAMED_LITERAL_STRING(kContentAccessible, "contentaccessible");
    NS_NAMED_LITERAL_STRING(kApplication, "application");
@@ -3488,9 +3490,9 @@
    NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers");
  
    nsAutoString appID;
-@@ -444,41 +446,46 @@ ParseManifest(NSLocationType type, FileL
+@@ -445,42 +447,47 @@ ParseManifest(NSLocationType type, FileL
          CopyUTF8toUTF16(s, abi);
-         abi.Insert(PRUnichar('_'), 0);
+         abi.Insert(char16_t('_'), 0);
          abi.Insert(osTarget, 0);
        }
      }
@@ -3499,24 +3501,25 @@
    nsAutoString osVersion;
 +  nsAutoString desktop;
  #if defined(XP_WIN)
+ #pragma warning(push)
+ #pragma warning(disable:4996) // VC12+ deprecates GetVersionEx
    OSVERSIONINFO info = { sizeof(OSVERSIONINFO) };
    if (GetVersionEx(&info)) {
-     nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
+     nsTextFormatter::ssprintf(osVersion, MOZ_UTF16("%ld.%ld"),
                                           info.dwMajorVersion,
                                           info.dwMinorVersion);
    }
 +  desktop = NS_LITERAL_STRING("win");
+ #pragma warning(pop)
  #elif defined(MOZ_WIDGET_COCOA)
-   SInt32 majorVersion, minorVersion;
-   if ((Gestalt(gestaltSystemVersionMajor, &majorVersion) == noErr) &&
-       (Gestalt(gestaltSystemVersionMinor, &minorVersion) == noErr)) {
-     nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
-                                          majorVersion,
-                                          minorVersion);
-   }
+   SInt32 majorVersion = nsCocoaFeatures::OSXVersionMajor();
+   SInt32 minorVersion = nsCocoaFeatures::OSXVersionMinor();
+   nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
+                                        majorVersion,
+                                        minorVersion);
 +  desktop = NS_LITERAL_STRING("macosx");
  #elif defined(MOZ_WIDGET_GTK)
-   nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
+   nsTextFormatter::ssprintf(osVersion, MOZ_UTF16("%ld.%ld"),
                                         gtk_major_version,
                                         gtk_minor_version);
 +  desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome");
@@ -3535,7 +3538,7 @@
  
    char *token;
    char *newline = buf;
-@@ -560,24 +567,26 @@ ParseManifest(NSLocationType type, FileL
+@@ -562,24 +569,26 @@ ParseManifest(NSLocationType type, FileL
      TriState stOsVersion = eUnspecified;
      TriState stOs = eUnspecified;
      TriState stABI = eUnspecified;
@@ -3562,7 +3565,7 @@
  #if defined(MOZ_WIDGET_ANDROID)
        bool tablet = false;
        if (CheckFlag(kTablet, wtoken, tablet)) {
-@@ -606,16 +615,17 @@ ParseManifest(NSLocationType type, FileL
+@@ -608,16 +617,17 @@ ParseManifest(NSLocationType type, FileL
      }
  
      if (!ok ||
--- a/mozilla-ppc64le-mfbt.patch	Sun Apr 13 16:54:09 2014 +0200
+++ b/mozilla-ppc64le-mfbt.patch	Mon Apr 14 09:09:11 2014 +0200
@@ -1,5 +1,5 @@
 # HG changeset patch
-# Parent 147a75fe8f8e4a43b66f9716659e1209d7f5a950
+# Parent 46508a61b834f02575c116a508aa37b66d50bd20
 # User Ulrich Weigand <uweigand@de.ibm.com>
 Bug 976648 - powerpc64le-linux support - mfbt endian config
 
@@ -38,7 +38,7 @@
 -      defined(__ppc__) || defined(__hppa) || \
 +      defined(_POWER) || defined(__hppa) || \
        defined(_MIPSEB) || defined(__ARMEB__) || \
-       defined(__s390__) || \
+       defined(__s390__) || defined(__AARCH64EB__) || \
        (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \
        (defined(__ia64) && defined(__BIG_ENDIAN__))
  #  define MOZ_BIG_ENDIAN 1
--- a/mozilla-shared-nss-db.patch	Sun Apr 13 16:54:09 2014 +0200
+++ b/mozilla-shared-nss-db.patch	Mon Apr 14 09:09:11 2014 +0200
@@ -7,7 +7,7 @@
 diff --git a/configure.in b/configure.in
 --- a/configure.in
 +++ b/configure.in
-@@ -8042,16 +8042,31 @@ if test "$MOZ_ENABLE_SKIA"; then
+@@ -8113,16 +8113,31 @@ if test "$MOZ_ENABLE_SKIA"; then
      MOZ_ENABLE_SKIA_GPU=1
      AC_DEFINE(USE_SKIA_GPU)
      AC_SUBST(MOZ_ENABLE_SKIA_GPU)
@@ -73,54 +73,49 @@
 +
  #include "nsNSSComponent.h"
  
- #include "CertVerifier.h"
+ #include "ExtendedValidation.h"
+ #include "NSSCertDBTrustDomain.h"
  #include "mozilla/Telemetry.h"
  #include "nsCertVerificationThread.h"
  #include "nsAppDirectoryServiceDefs.h"
  #include "nsComponentManagerUtils.h"
- #include "nsDirectoryServiceDefs.h"
-@@ -1207,18 +1214,35 @@ nsNSSComponent::InitializeNSS()
-     ConfigureInternalPKCS11Token();
+@@ -1117,17 +1124,31 @@ nsNSSComponent::InitializeNSS()
+   if (NS_FAILED(rv)) {
+     nsPSMInitPanic::SetPanic();
+     return NS_ERROR_NOT_AVAILABLE;
+   }
  
-     // The NSS_INIT_NOROOTINIT flag turns off the loading of the root certs
-     // module by NSS_Initialize because we will load it in InstallLoadableRoots
-     // later.  It also allows us to work around a bug in the system NSS in
-     // Ubuntu 8.04, which loads any nonexistent "<configdir>/libnssckbi.so" as
-     // "/usr/lib/nss/libnssckbi.so".
-     uint32_t init_flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE;
--    SECStatus init_rv = ::NSS_Initialize(profileStr.get(), "", "",
--                                         SECMOD_DB, init_flags);
-+
-+    SECStatus init_rv = SECFailure;
+   SECStatus init_rv = SECFailure;
+   if (!profileStr.IsEmpty()) {
+     // First try to initialize the NSS DB in read/write mode.
+-    SECStatus init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), false);
 +#ifdef MOZ_ENABLE_NSSHELPER
 +    if (PR_GetEnv("MOZ_XRE_NO_NSSHELPER")) {
-+      init_rv = ::NSS_Initialize(profileStr.get(), "", "",
-+                                 SECMOD_DB, init_flags);
++      init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), false);
 +    } else {
-+      init_rv = ::nsshelp_open_db ("Firefox", profileStr.get(), init_flags);
++      uint32_t flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE;
++      init_rv = ::nsshelp_open_db ("Firefox", profileStr.get(), flags);
 +
 +      if (init_rv != SECSuccess) {
 +        PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS using nsshelp_open_db in %s\n", profileStr.get()));
-+        init_rv = ::NSS_Initialize(profileStr.get(), "", "",
-+                                   SECMOD_DB, init_flags);
++        init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), false);
 +      }
 +    }
 +#else
-+    init_rv = ::NSS_Initialize(profileStr.get(), "", "",
-+                               SECMOD_DB, init_flags);
++    init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), false);
 +#endif
- 
+     // If that fails, attempt read-only mode.
      if (init_rv != SECSuccess) {
-       PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS r/w in %s\n", profileStr.get()));
- 
-       // try to init r/o
-       init_flags |= NSS_INIT_READONLY;
-       init_rv = ::NSS_Initialize(profileStr.get(), "", "",
-                                  SECMOD_DB, init_flags);
+       PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("could not init NSS r/w in %s\n", profileStr.get()));
+       init_rv = ::mozilla::psm::InitializeNSS(profileStr.get(), true);
+     }
+     if (init_rv != SECSuccess) {
+       PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("could not init in r/o either\n"));
+     }
 diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in
 --- a/toolkit/library/Makefile.in
 +++ b/toolkit/library/Makefile.in
-@@ -245,17 +245,17 @@ endif
+@@ -223,17 +223,17 @@ endif
  ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
  SDK_LIBRARY = $(IMPORT_LIBRARY)
  else
--- a/series	Sun Apr 13 16:54:09 2014 +0200
+++ b/series	Mon Apr 14 09:09:11 2014 +0200
@@ -6,40 +6,32 @@
 mozilla-shared-nss-db.patch
 mozilla-kde.patch
 mozilla-preferences.patch
-#mozilla-gconf-backend.patch
-#gecko-lockdown.patch
-#toolkit-ui-lockdown.patch
 mozilla-language.patch
 mozilla-ntlm-full-path.patch
 mozilla-repo.patch
 mozilla-sle11.patch
+mozilla-icu-strncat.patch
 mozilla-arm-disable-edsp.patch
 mozilla-ppc.patch
 mozilla-idldir.patch
 mozilla-libproxy-compat.patch
-mozilla-ppc64le-build.patch
+#mozilla-ppc64le-build.patch
 mozilla-ppc64le-javascript.patch
 mozilla-ppc64le-libffi.patch
 mozilla-ppc64le-mfbt.patch
 mozilla-ppc64le-webrtc.patch
 mozilla-ppc64le-xpcom.patch
 mozilla-ppc64-xpcom.patch
-mozilla-aarch64-bmo-963031.patch
 mozilla-aarch64-bmo-963024.patch
 mozilla-aarch64-bmo-963023.patch
-mozilla-aarch64-bmo-963029.patch
-mozilla-aarch64-bmo-963028.patch
 mozilla-aarch64-bmo-963027.patch
-mozilla-aarch64-bmo-963030.patch
 mozilla-aarch64-bmo-962488.patch
 mozilla-aarch64-bmo-810631.patch
-mozilla-aarch64-599882cfb998.diff
 
 # Firefox patches
-firefox-browser-css.patch
+#firefox-browser-css.patch
 firefox-kde.patch
 firefox-kde-114.patch
-#firefox-ui-lockdown.patch
 firefox-no-default-ualocale.patch
 firefox-multilocale-chrome.patch
 firefox-branded-icons.patch
--- a/toolkit-download-folder.patch	Sun Apr 13 16:54:09 2014 +0200
+++ b/toolkit-download-folder.patch	Mon Apr 14 09:09:11 2014 +0200
@@ -6,7 +6,12 @@
 diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
 --- a/browser/components/preferences/main.js
 +++ b/browser/components/preferences/main.js
-@@ -344,7 +344,7 @@ var gMainPane = {
+@@ -290,17 +290,17 @@ var gMainPane = {
+       // and was available as an option in the 1.5 drop down. On XP this
+       // was in My Documents, on OSX it was in User Docs. In 2.0, we did
+       // away with the drop down option, although the special label was
+       // still supported for the folder if it existed. Because it was
+       // not exposed it was rarely used.
        // With 3.0, a new desktop folder - 'Downloads' was introduced for
        // platforms and versions that don't support a default system downloads
        // folder. See nsDownloadManager for details. 
@@ -15,14 +20,24 @@
        iconUrlSpec = fph.getURLSpecFromFile(this._indexToFolder(1));
      } else {
        // 'Desktop'
+       downloadFolder.label = bundlePreferences.getString("desktopFolderName");
+       iconUrlSpec = fph.getURLSpecFromFile(this._getDownloadsFolder("Desktop"));
+     }
+     downloadFolder.image = "moz-icon://" + iconUrlSpec + "?size=16";
+     
 diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp
 --- a/toolkit/components/downloads/nsDownloadManager.cpp
 +++ b/toolkit/components/downloads/nsDownloadManager.cpp
-@@ -1269,8 +1269,10 @@ nsDownloadManager::GetDefaultDownloadsDi
+@@ -1365,18 +1365,20 @@ nsDownloadManager::GetDefaultDownloadsDi
+   // Vista:
+   // Downloads
+   // XP/2K:
+   // My Documents/Downloads
+   // Linux:
    // XDG user dir spec, with a fallback to Home/Downloads
  
    nsXPIDLString folderName;
--  mBundle->GetStringFromName(NS_LITERAL_STRING("downloadsFolder").get(),
+-  mBundle->GetStringFromName(MOZ_UTF16("downloadsFolder"),
 -                             getter_Copies(folderName));
 +  // We don't want localized "Downloads" unless XDG is used
 +  //mBundle->GetStringFromName(NS_LITERAL_STRING("downloadsFolder").get(),
@@ -31,3 +46,8 @@
  
  #if defined (XP_MACOSX)
    rv = dirService->Get(NS_OSX_DEFAULT_DOWNLOAD_DIR,
+                        NS_GET_IID(nsIFile),
+                        getter_AddRefs(downloadDir));
+   NS_ENSURE_SUCCESS(rv, rv);
+ #elif defined(XP_WIN)
+   rv = dirService->Get(NS_WIN_DEFAULT_DOWNLOAD_DIR,