working Aurora 17.0 build
authorWolfgang Rosenauer <wr@rosenauer.org>
Thu, 13 Sep 2012 21:36:45 +0200
changeset 541 830e50bbfc79
parent 540 55fe9dc16b1f
child 543 24c3eafd49a1
working Aurora 17.0 build
MozillaFirefox/MozillaFirefox.changes
MozillaFirefox/MozillaFirefox.spec
firefox-kde.patch
firefox-multilocale-chrome.patch
mozilla-gstreamer-760140.patch
mozilla-kde.patch
mozilla-ntlm-full-path.patch
mozilla-pkgconfig.patch
mozilla-prefer_plugin_pref.patch
mozilla-shared-nss-db.patch
--- a/MozillaFirefox/MozillaFirefox.changes	Tue Sep 11 19:27:36 2012 +0200
+++ b/MozillaFirefox/MozillaFirefox.changes	Thu Sep 13 21:36:45 2012 +0200
@@ -1,7 +1,8 @@
 -------------------------------------------------------------------
-Tue Sep 11 09:55:36 UTC 2012 - wr@rosenauer.org
+Thu Sep 13 19:35:29 UTC 2012 - wr@rosenauer.org
 
 - update to Aurora 17 (20120910)
+- use internal NSPR for now (bmo#776877)
 
 -------------------------------------------------------------------
 Tue Sep 11 06:16:38 UTC 2012 - wr@rosenauer.org
@@ -15,6 +16,13 @@
   (requires mozilla-kde4-integration >= 0.6.4)
 
 -------------------------------------------------------------------
+Mon Sep 10 19:37:56 UTC 2012 - wr@rosenauer.org
+
+- update to Firefox 15.0.1 (bnc#779936)
+  * Sites visited while in Private Browsing mode could be found
+      through manual browser cache inspection (bmo#787743)
+
+-------------------------------------------------------------------
 Sun Aug 26 13:47:43 UTC 2012 - wr@rosenauer.org
 
 - update to Firefox 15.0 (bnc#777588)
--- a/MozillaFirefox/MozillaFirefox.spec	Tue Sep 11 19:27:36 2012 +0200
+++ b/MozillaFirefox/MozillaFirefox.spec	Thu Sep 13 21:36:45 2012 +0200
@@ -275,7 +275,7 @@
 ac_add_options --sysconfdir=%{_sysconfdir}
 ac_add_options --mandir=%{_mandir}
 ac_add_options --includedir=%{_includedir}
-ac_add_options --with-system-nspr
+#ac_add_options --with-system-nspr
 ac_add_options --with-system-nss
 ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n
 #ac_add_options --with-system-jpeg    # libjpeg-turbo is used internally
@@ -363,7 +363,6 @@
   	make -C browser/locales langpack-$locale
 	cp -rL dist/xpi-stage/locale-$locale \
 	       $RPM_BUILD_ROOT%{progdir}/extensions/langpack-$locale@firefox.mozilla.org
-	rm $RPM_BUILD_ROOT%{progdir}/extensions/langpack-$locale@firefox.mozilla.org/chrome/.mkdir.done
 	# remove prefs, profile defaults, and hyphenation from langpack
 	rm -rf $RPM_BUILD_ROOT%{progdir}/extensions/langpack-$locale@firefox.mozilla.org/defaults
 	rm -rf $RPM_BUILD_ROOT%{progdir}/extensions/langpack-$locale@firefox.mozilla.org/hyphenation
@@ -388,6 +387,8 @@
      -name "*.txt" -o \
      -name "*.xml" -o \
      -name "*.css" | xargs chmod a-x
+# remove mkdir.done files from installed base
+find $RPM_BUILD_ROOT%{progdir} -name ".mkdir.done" | xargs rm
 # overwrite the mozilla start-script and link it to /usr/bin
 mkdir --parents $RPM_BUILD_ROOT/usr/bin
 sed "s:%%PREFIX:%{_prefix}:g
--- a/firefox-kde.patch	Tue Sep 11 19:27:36 2012 +0200
+++ b/firefox-kde.patch	Thu Sep 13 21:36:45 2012 +0200
@@ -2,7 +2,7 @@
 new file mode 100644
 --- /dev/null
 +++ b/browser/base/content/browser-kde.xul
-@@ -0,0 +1,1210 @@
+@@ -0,0 +1,1264 @@
 +#filter substitution
 +<?xml version="1.0"?>
 +# -*- Mode: HTML -*-
@@ -14,7 +14,6 @@
 +<?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/devtools/webconsole.css" type="text/css"?>
 +<?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
 +
 +<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
@@ -60,9 +59,6 @@
 +#include global-scripts.inc
 +<script type="application/javascript" src="chrome://browser/content/nsContextMenu.js"/>
 +
-+#ifdef MOZ_SAFE_BROWSING
-+<script type="application/javascript" src="chrome://browser/content/safebrowsing/sb-loader.js"/>
-+#endif
 +<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
 +
 +<script type="application/javascript" src="chrome://browser/content/places/editBookmarkOverlay.js"/>
@@ -187,6 +183,44 @@
 +      </hbox>
 +    </panel>
 +
++    <panel id="socialActivatedNotification"
++           type="arrow"
++           hidden="true"
++           consumeoutsideclicks="true"
++           align="start"
++           role="alert">
++      <hbox flex="1">
++        <image src="chrome://browser/content/social-icon.png" class="popup-notification-icon"/>
++        <vbox flex="1">
++          <description id="social-activation-message" class="popup-notification-description"/>
++          <spacer flex="1"/>
++          <hbox pack="end" align="center" class="popup-notification-button-container">
++#ifdef XP_UNIX
++        <button id="social-undoactivation-button"
++                label="&social.activated.undobutton.label;"
++                accesskey="&social.activated.undobutton.accesskey;"
++                onclick="SocialUI.undoActivation();"/>
++        <button default="true"
++                autofocus="autofocus"
++                label="&social.ok.label;"
++                accesskey="&social.ok.accesskey;"
++                oncommand="SocialUI.notificationPanel.hidePopup();"/>
++#else
++        <button default="true"
++                autofocus="autofocus"
++                label="&social.ok.label;"
++                accesskey="&social.ok.accesskey;"
++                oncommand="SocialUI.notificationPanel.hidePopup();"/>
++        <button id="social-undoactivation-button"
++                label="&social.activated.undobutton.label;"
++                accesskey="&social.activated.undobutton.accesskey;"
++                onclick="SocialUI.undoActivation();"/>
++#endif
++          </hbox>
++        </vbox>
++      </hbox>
++    </panel>
++
 +    <panel id="editSharePopup"
 +           type="arrow"
 +           orient="vertical"
@@ -195,6 +229,19 @@
 +           onpopupshown="SocialShareButton.panelShown(event);"
 +           consumeoutsideclicks="true"
 +           level="top">
++      <row id="editSharePopupHeader" align="center">
++        <vbox align="center">
++          <image id="socialUserPortrait" onclick="SocialUI.showProfile();"
++                 aria-label="&social.sharePopup.portrait.arialabel;"/>
++        </vbox>
++        <vbox id="editSharePopupText">
++          <button id="socialUserDisplayName"
++                  oncommand="SocialUI.showProfile();"/>
++          <spacer flex="1"/>
++          <label id="socialUserRecommendedText"
++                 value="&social.sharePopup.shared.label;"/>
++        </vbox>
++      </row>
 +      <hbox id="editSharePopupBottomButtons" pack="end">
 +#ifdef XP_UNIX
 +        <button id="editSharePopupUndoButton"
@@ -206,16 +253,16 @@
 +                class="editSharePopupBottomButton"
 +                default="true"
 +                autofocus="autofocus"
-+                label="&social.sharePopup.ok.label;"
-+                accesskey="&social.sharePopup.ok.accesskey;"
++                label="&social.ok.label;"
++                accesskey="&social.ok.accesskey;"
 +                oncommand="SocialShareButton.dismissSharePopup();"/>
 +#else
 +        <button id="editSharePopupOkButton"
 +                class="editSharePopupBottomButton"
 +                default="true"
 +                autofocus="autofocus"
-+                label="&social.sharePopup.ok.label;"
-+                accesskey="&social.sharePopup.ok.accesskey;"
++                label="&social.ok.label;"
++                accesskey="&social.ok.accesskey;"
 +                oncommand="SocialShareButton.dismissSharePopup();"/>
 +        <button id="editSharePopupUndoButton"
 +                class="editSharePopupBottomButton"
@@ -227,8 +274,16 @@
 +    </panel>
 +
 +    <panel id="social-notification-panel" type="arrow" hidden="true" noautofocus="true">
-+      <browser id="social-notification-browser" type="content" flex="1"/>
++      <box id="social-notification-box" flex="1"></box>
 +    </panel>
++    <panel id="social-flyout-panel"
++           onpopupshown="SocialFlyout.onShown()"
++           onpopuphidden="SocialFlyout.onHidden()"
++           side="right"
++           type="arrow"
++           hidden="true"
++           noautofocus="true"
++           position="topcenter topright"/>
 +
 +    <menupopup id="inspector-node-popup">
 +      <menuitem id="inspectorHTMLCopyInner"
@@ -522,6 +577,7 @@
 +                 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"/>
@@ -616,6 +672,7 @@
 +      <toolbaritem id="social-toolbar-button"
 +                   class="toolbarbutton-1 chromeclass-toolbar-additional"
 +                   removable="false"
++                   pack="center"
 +                   title="&socialToolbar.title;"
 +                   hidden="true">
 +        <hbox id="social-toolbar-button-box" class="social-statusarea-container">
@@ -630,24 +687,15 @@
 +                          oncommand="SocialUI.showProfile(); document.getElementById('social-statusarea-popup').hidePopup();"/>
 +                </vbox>
 +              </hbox>
++              <menuitem id="social-toggle-sidebar-menuitem"
++                        type="checkbox"
++                        autocheck="false"
++                        command="Social:ToggleSidebar"
++                        label="&social.toggleSidebar.label;"
++                        accesskey="&social.toggleSidebar.accesskey;"/>
 +            </menupopup>
 +          </button>
 +          <hbox id="social-status-iconbox" flex="1">
-+            <box class="social-notification-icon-container" collapsed="true"
-+                     onclick="SocialToolbar.showAmbientPopup(this);">
-+              <image class="social-notification-icon-image"/>
-+              <box class="social-notification-icon-counter" collapsed="true"/>
-+            </box>
-+            <box class="social-notification-icon-container" collapsed="true"
-+                     onclick="SocialToolbar.showAmbientPopup(this);">
-+              <image class="social-notification-icon-image"/>
-+              <box class="social-notification-icon-counter" collapsed="true"/>
-+            </box>
-+            <box class="social-notification-icon-container" collapsed="true"
-+                     onclick="SocialToolbar.showAmbientPopup(this);">
-+              <image class="social-notification-icon-image"/>
-+              <box class="social-notification-icon-counter" collapsed="true"/>
-+            </box>
 +          </hbox>
 +        </hbox>
 +      </toolbaritem>
@@ -737,7 +785,7 @@
 +        </toolbarbutton>
 +      </toolbaritem>
 +
-+      <hbox id="window-controls" hidden="true" fullscreencontrol="true" pack="end">
++      <hbox id="window-controls" hidden="true" pack="end">
 +        <toolbarbutton id="minimize-button"
 +                       tooltiptext="&fullScreenMinimize.tooltip;"
 +                       oncommand="window.minimize();"/>
@@ -895,14 +943,14 @@
 +                     tooltiptext="&printButton.tooltip;"/>
 +
 +      <!-- This is a placeholder for the Downloads Indicator.  It is visible
-+           only during the customization of the toolbar or in the palette, and
-+           is replaced when customization is done. -->
++           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"
-+                     observes="Tools:Downloads"
-+                     ondrop="DownloadsButtonDNDObserver.onDrop(event)"
-+                     ondragover="DownloadsButtonDNDObserver.onDragOver(event)"
-+                     ondragenter="DownloadsButtonDNDObserver.onDragOver(event)"
-+                     ondragexit="DownloadsButtonDNDObserver.onDragExit(event)"
++                     oncommand="DownloadsIndicatorView.onCommand(event);"
++                     ondrop="DownloadsIndicatorView.onDrop(event);"
++                     ondragover="DownloadsIndicatorView.onDragOver(event);"
++                     ondragenter="DownloadsIndicatorView.onDragOver(event);"
++                     ondragleave="DownloadsIndicatorView.onDragLeave(event);"
 +                     label="&downloads.label;"
 +                     tooltiptext="&downloads.tooltip;"/>
 +
@@ -1006,7 +1054,7 @@
 +                style="min-width: 14em; width: 18em; max-width: 36em;"/>
 +    </vbox>
 +
-+    <splitter id="sidebar-splitter" class="chromeclass-extrachrome" hidden="true"/>
++    <splitter id="sidebar-splitter" class="chromeclass-extrachrome sidebar-splitter" hidden="true"/>
 +    <vbox id="appcontent" flex="1">
 +      <tabbrowser id="content" disablehistory="true"
 +                  flex="1" contenttooltip="aHTMLTooltip"
@@ -1014,6 +1062,7 @@
 +                  contentcontextmenu="contentAreaContextMenu"
 +                  autocompletepopup="PopupAutoComplete"
 +                  onclick="contentAreaClick(event, false);"/>
++      <chatbar id="pinnedchats" layer="true" mousethrough="always"/>
 +      <statuspanel id="statusbar-display" inactive="true"/>
 +    </vbox>
 +    <splitter id="devtools-side-splitter" hidden="true"/>
@@ -1024,6 +1073,18 @@
 +               nowindowdrag="true"/>
 +      <deck id="devtools-sidebar-deck" flex="1"/>
 +    </vbox>
++    <splitter id="social-sidebar-splitter"
++              class="chromeclass-extrachrome sidebar-splitter"
++              observes="socialSidebarBroadcaster"/>
++    <vbox id="social-sidebar-box"
++          class="chromeclass-extrachrome"
++          observes="socialSidebarBroadcaster">
++      <browser id="social-sidebar-browser"
++               type="content"
++               disableglobalhistory="true"
++               flex="1"
++               style="min-width: 14em; width: 18em; max-width: 36em;"/>
++    </vbox>
 +    <vbox id="browser-border-end" hidden="true" layer="true"/>
 +  </hbox>
 +
@@ -1059,24 +1120,6 @@
 +                     oncommand="InspectorUI.closeInspectorUI(false);"
 +                     tooltiptext="&inspectCloseButton.tooltiptext;"/>
 +#endif
-+      <toolbarbutton id="inspector-option-toolbarbutton"
-+                     type="menu"
-+                     tabindex="0"
-+                     tooltiptext="&inspectOptionButton.tooltiptext;">
-+        <menupopup id="inspector-option-popup"
-+                   position="before_start">
-+          <menuitem id="inspectorToggleVeil"
-+                    type="checkbox"
-+                    label="&inspectorToggleVeil.label;"
-+                    accesskey="&inspectorToggleVeil.accesskey;"
-+                    command="Inspector:ToggleVeil"/>
-+          <menuitem id="inspectorToggleInfobar"
-+                    type="checkbox"
-+                    label="&inspectorToggleInfobar.label;"
-+                    accesskey="&inspectorToggleInfobar.accesskey;"
-+                    command="Inspector:ToggleInfobar"/>
-+        </menupopup>
-+      </toolbarbutton>
 +      <toolbarbutton id="inspector-inspect-toolbutton"
 +                     class="devtools-toolbarbutton"
 +                     command="Inspector:Inspect"/>
@@ -1130,24 +1173,35 @@
 +            <textbox class="gclitoolbar-input-node" rows="1"/>
 +          </stack>
 +          <toolbarbutton id="developer-toolbar-webconsole"
-+                         label="&webConsoleButton.label;"
 +                         class="developer-toolbar-button"
-+                         command="Tools:WebConsole"/>
++                         observes="devtoolsMenuBroadcaster_WebConsole"/>
 +          <toolbarbutton id="developer-toolbar-inspector"
-+                         label="&inspectorButton.label;"
 +                         class="developer-toolbar-button"
-+                         hidden="true"
-+                         command="Tools:Inspect"/>
++                         observes="devtoolsMenuBroadcaster_Inspect"/>
 +          <toolbarbutton id="developer-toolbar-styleeditor"
-+                         label="&styleeditor.label;"
 +                         class="developer-toolbar-button"
-+                         hidden="true"
-+                         command="Tools:StyleEditor"/>
++                         observes="devtoolsMenuBroadcaster_StyleEditor"/>
 +          <toolbarbutton id="developer-toolbar-debugger"
-+                         label="&debuggerMenu.label2;"
++                         class="developer-toolbar-button"
++                         observes="devtoolsMenuBroadcaster_Debugger"/>
++          <toolbarbutton id="developer-toolbar-other-tools"
++                         type="menu"
 +                         class="developer-toolbar-button"
-+                         hidden="true"
-+                         command="Tools:Debugger"/>
++                         label="&devToolbarOtherToolsButton.label;">
++            <menupopup position="before_end">
++               <menuitem observes="devtoolsMenuBroadcaster_DevToolbar"/>
++               <menuitem observes="devtoolsMenuBroadcaster_ResponsiveUI"/>
++               <menuitem observes="devtoolsMenuBroadcaster_RemoteDebugger"/>
++               <menuitem observes="devtoolsMenuBroadcaster_ChromeDebugger"/>
++               <menuitem observes="devtoolsMenuBroadcaster_Scratchpad"/>
++               <menuitem observes="devtoolsMenuBroadcaster_StyleEditor"/>
++               <menuitem observes="devtoolsMenuBroadcaster_PageSource"/>
++               <menuitem observes="devtoolsMenuBroadcaster_ErrorConsole"/>
++               <menuseparator/>
++               <menuitem observes="devtoolsMenuBroadcaster_GetMoreTools"/>
++            </menupopup>
++          </toolbarbutton>
++
 +#ifndef XP_MACOSX
 +          <toolbarbutton id="developer-toolbar-closebutton"
 +                         class="devtools-closebutton"
@@ -1228,13 +1282,13 @@
 +*       content/browser/browser-kde.xul               (content/browser-kde.xul)
 +%       override chrome://browser/content/browser.xul chrome://browser/content/browser-kde.xul desktop=kde
  *       content/browser/browser-tabPreviews.xml       (content/browser-tabPreviews.xml)
- *       content/browser/content.js                    (content/content.js)
- *       content/browser/newtab/newTab.xul             (content/newtab/newTab.xul)
+         content/browser/content.js                    (content/content.js)
+         content/browser/newtab/newTab.xul             (content/newtab/newTab.xul)
  *       content/browser/newtab/newTab.js              (content/newtab/newTab.js)
          content/browser/newtab/newTab.css             (content/newtab/newTab.css)
  *       content/browser/pageinfo/pageInfo.xul         (content/pageinfo/pageInfo.xul)
  *       content/browser/pageinfo/pageInfo.js          (content/pageinfo/pageInfo.js)
- *       content/browser/pageinfo/pageInfo.css         (content/pageinfo/pageInfo.css)
+         content/browser/pageinfo/pageInfo.css         (content/pageinfo/pageInfo.css)
 diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp
 --- a/browser/components/build/nsModule.cpp
 +++ b/browser/components/build/nsModule.cpp
@@ -1589,7 +1643,7 @@
 +NS_IMETHODIMP
 +nsKDEShellService::GetDefaultFeedReader(nsIFile** _retval)
 +    {
-+    *_retval = nsnull;
++    *_retval = nullptr;
 +
 +    nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID );
 +    if( !command )
@@ -1811,7 +1865,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
-@@ -558,18 +558,20 @@
+@@ -559,18 +559,20 @@
  @BINPATH@/@PREF_DIR@/services-sync.js
  #endif
  @BINPATH@/greprefs.js
--- a/firefox-multilocale-chrome.patch	Tue Sep 11 19:27:36 2012 +0200
+++ b/firefox-multilocale-chrome.patch	Thu Sep 13 21:36:45 2012 +0200
@@ -1,12 +1,12 @@
 # HG changeset patch
 # User Wolfgang Rosenauer <wr@rosenauer.org>
-# Parent 5c446cfb862fdb6685634dbeea9bff31fa19fc3e
+# Parent ba286b90465d93b93487c0de6f8ebe5d1821d2c0
 Add searchplugins to chrome packaging for proper localization
 
 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
-@@ -327,16 +327,20 @@ pref("browser.download.useToolkitUI", fa
+@@ -332,16 +332,20 @@ pref("browser.download.useToolkitUI", tr
  pref("browser.download.panel.removeFinishedDownloads", false);
  
  // search engines URL
@@ -30,7 +30,7 @@
 diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
 --- a/browser/locales/Makefile.in
 +++ b/browser/locales/Makefile.in
-@@ -121,39 +121,48 @@ libs:: $(call MERGE_FILES,$(addprefix pr
+@@ -118,39 +118,48 @@ libs:: $(call MERGE_FILES,$(addprefix pr
  install:: $(DESTDIR)$(mozappdir)/defaults/profile/bookmarks.html ;
  
  install:: $(addprefix generic/profile/,$(PROFILE_FILES))
@@ -89,18 +89,18 @@
  	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR) BOTH_MANIFESTS=1
  	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
  
- 
  repackage-win32-installer: WIN32_INSTALLER_OUT=$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
- repackage-win32-installer: $(call ESCAPE_SPACE,$(WIN32_INSTALLER_IN)) $(SUBMAKEFILES) libs-$(AB_CD)
+ repackage-win32-installer: $(call ESCAPE_WILDCARD,$(WIN32_INSTALLER_IN)) $(SUBMAKEFILES) libs-$(AB_CD)
+ 	@echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)."
 diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn
 --- a/browser/locales/jar.mn
 +++ b/browser/locales/jar.mn
 @@ -108,16 +108,17 @@
      locale/browser-region/region.properties        (%chrome/browser-region/region.properties)
  # the following files are browser-specific overrides
- *   locale/browser/netError.dtd                (%chrome/overrides/netError.dtd)
- *   locale/browser/appstrings.properties       (%chrome/overrides/appstrings.properties)
- *   locale/browser/downloads/settingsChange.dtd  (%chrome/overrides/settingsChange.dtd)
+     locale/browser/netError.dtd                (%chrome/overrides/netError.dtd)
+     locale/browser/appstrings.properties       (%chrome/overrides/appstrings.properties)
+     locale/browser/downloads/settingsChange.dtd  (%chrome/overrides/settingsChange.dtd)
  % override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd
  % override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties
  % override chrome://mozapps/locale/downloads/settingsChange.dtd chrome://browser/locale/downloads/settingsChange.dtd
--- a/mozilla-gstreamer-760140.patch	Tue Sep 11 19:27:36 2012 +0200
+++ b/mozilla-gstreamer-760140.patch	Thu Sep 13 21:36:45 2012 +0200
@@ -24,7 +24,7 @@
  #include "mozilla/Base64.h"
  #include "mozilla/Preferences.h"
  #include "nsDOMMutationObserver.h"
-@@ -6511,26 +6514,23 @@ nsContentUtils::FindInternalContentViewe
+@@ -6580,26 +6583,23 @@ nsContentUtils::FindInternalContentViewe
          }
          return docFactory.forget();
        }
@@ -43,7 +43,7 @@
 -        }
 -        return docFactory.forget();
 +  if (nsHTMLMediaElement::IsGStreamerEnabled()) {
-+    if (nsGStreamerDecoder::CanHandleMediaType(aType, NULL)) {
++    if (nsGStreamerDecoder::CanHandleMediaType(aType, nullptr)) {
 +      docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
 +      if (docFactory && aLoaderType) {
 +        *aLoaderType = TYPE_CONTENT;
@@ -52,15 +52,15 @@
      }
    }
  #endif
- #endif // MOZ_MEDIA
  
-   return NULL;
- }
- 
+ #ifdef MOZ_MEDIA_PLUGINS
+   if (nsHTMLMediaElement::IsMediaPluginsEnabled() &&
+       nsHTMLMediaElement::IsMediaPluginsType(nsDependentCString(aType))) {
+     docFactory = do_GetService("@mozilla.org/content/document-loader-factory;1");
 diff --git a/content/html/content/public/nsHTMLMediaElement.h b/content/html/content/public/nsHTMLMediaElement.h
 --- a/content/html/content/public/nsHTMLMediaElement.h
 +++ b/content/html/content/public/nsHTMLMediaElement.h
-@@ -250,17 +250,19 @@ public:
+@@ -256,17 +256,19 @@ public:
    void UpdateMediaSize(nsIntSize size);
  
    // Returns the CanPlayStatus indicating if we can handle this
@@ -81,18 +81,18 @@
    // Returns true if we should handle this MIME type when it appears
    // as an <object> or as a toplevel page. If, in practice, our support
    // for the type is more limited than appears in the wild, we should return
-@@ -290,20 +292,17 @@ public:
+@@ -296,20 +298,17 @@ public:
  #ifdef MOZ_WEBM
    static bool IsWebMEnabled();
    static bool IsWebMType(const nsACString& aType);
-   static const char gWebMTypes[2][17];
+   static const char gWebMTypes[2][11];
    static char const *const gWebMCodecs[4];
  #endif
  
  #ifdef MOZ_GSTREAMER
 -  static bool IsH264Enabled();
 -  static bool IsH264Type(const nsACString& aType);
--  static const char gH264Types[3][17];
+-  static const char gH264Types[3][16];
 -  static char const *const gH264Codecs[7];
 +  static bool IsGStreamerEnabled();
  #endif
@@ -106,7 +106,7 @@
 diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/content/src/nsHTMLMediaElement.cpp
 --- a/content/html/content/src/nsHTMLMediaElement.cpp
 +++ b/content/html/content/src/nsHTMLMediaElement.cpp
-@@ -2070,68 +2070,40 @@ nsHTMLMediaElement::IsWebMType(const nsA
+@@ -2112,52 +2112,20 @@ nsHTMLMediaElement::IsWebMType(const nsA
      }
    }
  
@@ -115,7 +115,7 @@
  #endif
  
  #ifdef MOZ_GSTREAMER
--const char nsHTMLMediaElement::gH264Types[3][17] = {
+-const char nsHTMLMediaElement::gH264Types[3][16] = {
 -  "video/mp4",
 -  "video/3gpp",
 -  "video/quicktime",
@@ -128,7 +128,7 @@
 -  "avc1.4D401E",
 -  "avc1.64001E",
 -  "mp4a.40.2",
--  nsnull
+-  nullptr
 -};
 -
  bool
@@ -145,7 +145,7 @@
 -    return false;
 -  }
 -
--  for (PRUint32 i = 0; i < ArrayLength(gH264Types); ++i) {
+-  for (uint32_t i = 0; i < ArrayLength(gH264Types); ++i) {
 -    if (aType.EqualsASCII(gH264Types[i])) {
 -      return true;
 -    }
@@ -161,6 +161,9 @@
  nsHTMLMediaElement::IsMediaPluginsEnabled()
  {
    return Preferences::GetBool("media.plugins.enabled");
+@@ -2180,18 +2148,22 @@ nsHTMLMediaElement::IsMediaPluginsType(c
+   }
+   return false;
  }
  #endif
  
@@ -182,7 +185,7 @@
  #endif
  #ifdef MOZ_OGG
    if (IsOggType(nsDependentCString(aMIMEType))) {
-@@ -2148,20 +2120,22 @@ nsHTMLMediaElement::CanHandleMediaType(c
+@@ -2208,20 +2180,22 @@ nsHTMLMediaElement::CanHandleMediaType(c
  #ifdef MOZ_WEBM
    if (IsWebMType(nsDependentCString(aMIMEType))) {
      *aCodecList = gWebMCodecs;
@@ -198,18 +201,18 @@
 +  if (aCheckCodecList)
 +    *aCheckCodecList = false;
 +  if (aCodecList)
-+    *aCodecList = NULL;
++    *aCodecList = nullptr;
 +  if (nsGStreamerDecoder::CanHandleMediaType(aMIMEType, aCodecs))
 +    return CANPLAY_YES;
  #endif
  #ifdef MOZ_MEDIA_PLUGINS
-   if (GetMediaPluginHost()->FindDecoder(nsDependentCString(aMIMEType), aCodecList))
+   if (IsMediaPluginsEnabled() && GetMediaPluginHost()->FindDecoder(nsDependentCString(aMIMEType), aCodecList))
      return CANPLAY_MAYBE;
  #endif
    return CANPLAY_NO;
  }
  
-@@ -2176,17 +2150,17 @@ bool nsHTMLMediaElement::ShouldHandleMed
+@@ -2236,17 +2210,17 @@ bool nsHTMLMediaElement::ShouldHandleMed
    if (IsOggType(nsDependentCString(aMIMEType)))
      return true;
  #endif
@@ -219,16 +222,16 @@
  #endif
  #ifdef MOZ_GSTREAMER
 -  if (IsH264Type(nsDependentCString(aMIMEType)))
-+  if (nsGStreamerDecoder::CanHandleMediaType(aMIMEType, NULL))
++  if (nsGStreamerDecoder::CanHandleMediaType(aMIMEType, nullptr))
      return true;
  #endif
  #ifdef MOZ_MEDIA_PLUGINS
-   if (GetMediaPluginHost()->FindDecoder(nsDependentCString(aMIMEType), NULL))
+   if (IsMediaPluginsEnabled() && GetMediaPluginHost()->FindDecoder(nsDependentCString(aMIMEType), NULL))
      return true;
  #endif
    // We should not return true for Wave types, since there are some
    // Wave codecs actually in use in the wild that we don't support, and
-@@ -2212,26 +2186,31 @@ nsHTMLMediaElement::GetCanPlay(const nsA
+@@ -2272,26 +2246,31 @@ nsHTMLMediaElement::GetCanPlay(const nsA
  {
    nsContentTypeParser parser(aType);
    nsAutoString mimeType;
@@ -265,7 +268,7 @@
    // of the 'codecs' parameter
    nsCharSeparatedTokenizer tokenizer(codecs, ',');
    bool expectMoreTokens = false;
-@@ -2309,17 +2288,19 @@ nsHTMLMediaElement::CreateDecoder(const 
+@@ -2369,17 +2348,19 @@ nsHTMLMediaElement::CreateDecoder(const 
      nsRefPtr<nsWebMDecoder> decoder = new nsWebMDecoder();
      if (decoder->Init(this)) {
        return decoder.forget();
@@ -284,12 +287,12 @@
      }
    }
  #endif
-   return nsnull;
+   return nullptr;
  }
 diff --git a/content/media/gstreamer/Makefile.in b/content/media/gstreamer/Makefile.in
 --- a/content/media/gstreamer/Makefile.in
 +++ b/content/media/gstreamer/Makefile.in
-@@ -16,16 +16,17 @@ LIBXUL_LIBRARY 	= 1
+@@ -17,16 +17,17 @@ LIBXUL_LIBRARY 	= 1
  
  EXPORTS		+= \
  		nsGStreamerDecoder.h \
@@ -545,7 +548,7 @@
 diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js
 --- a/modules/libpref/src/init/all.js
 +++ b/modules/libpref/src/init/all.js
-@@ -159,17 +159,17 @@ pref("media.opus.enabled", true);
+@@ -165,17 +165,17 @@ pref("media.opus.enabled", true);
  #endif
  #ifdef MOZ_WAVE
  pref("media.wave.enabled", true);
@@ -557,10 +560,10 @@
 -pref("media.h264.enabled", true);
 +pref("media.gstreamer.enabled", true);
  #endif
- 
- 
- // Whether to autostart a media element with an |autoplay| attribute
- pref("media.autoplay.enabled", true);
- 
- // 0 = Off, 1 = Full, 2 = Tagged Images Only. 
- // See eCMSMode in gfx/thebes/gfxPlatform.h
+ #ifdef MOZ_WEBRTC
+ pref("media.navigator.enabled", false);
+ #else
+ #ifdef ANDROID
+ pref("media.navigator.enabled", true);
+ #endif
+ #endif
--- a/mozilla-kde.patch	Tue Sep 11 19:27:36 2012 +0200
+++ b/mozilla-kde.patch	Thu Sep 13 21:36:45 2012 +0200
@@ -45,7 +45,7 @@
  #include "prefapi.h"
  #include "prefread.h"
  #include "prefapi_private_data.h"
-@@ -907,16 +908,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
+@@ -896,16 +897,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
  
  static nsresult pref_LoadPrefsInDirList(const char *listId)
  {
@@ -80,7 +80,7 @@
      return NS_OK;
  
    bool hasMore;
-@@ -932,17 +951,17 @@ static nsresult pref_LoadPrefsInDirList(
+@@ -921,17 +940,17 @@ static nsresult pref_LoadPrefsInDirList(
  
      nsCAutoString leaf;
      path->GetNativeLeafName(leaf);
@@ -89,7 +89,7 @@
      if (Substring(leaf, leaf.Length() - 4).Equals(NS_LITERAL_CSTRING(".xpi")))
        ReadExtensionPrefs(path);
      else
--      pref_LoadPrefsInDir(path, nsnull, 0);
+-      pref_LoadPrefsInDir(path, nullptr, 0);
 +      pref_LoadPrefsInDir(path, specialFiles, NS_ARRAY_LENGTH(specialFiles));
    }
    return NS_OK;
@@ -99,7 +99,7 @@
  {
    nsZipItemPtr<char> manifest(jarReader, name, true);
    NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
-@@ -1036,28 +1055,40 @@ static nsresult pref_InitInitialObjects(
+@@ -1025,28 +1044,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)
@@ -198,12 +198,12 @@
 +          nsKDEUtils::command( command );
 +        } else {
 +        // begin non-KDE block
-         PRInt32 alertInterval = 2000;
+         int32_t alertInterval = 2000;
          if (pref)
            pref->GetIntPref(PREF_BDM_SHOWALERTINTERVAL, &alertInterval);
  
-         PRInt64 alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC;
-         PRInt64 goat = PR_Now() - mStartTime;
+         int64_t alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC;
+         int64_t goat = PR_Now() - mStartTime;
          showTaskbarAlert = goat > alertIntervalUSec;
  
 @@ -2266,19 +2279,20 @@ nsDownload::SetState(DownloadState aStat
@@ -2068,8 +2068,7 @@
 diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
 +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
-@@ -12,16 +12,18 @@
- #include "nsArrayUtils.h"
+@@ -13,16 +13,19 @@
  #include "prnetdb.h"
  #include "prenv.h"
  #include "nsPrintfCString.h"
@@ -2077,24 +2076,26 @@
  #include "nsISupportsPrimitives.h"
  #include "nsIGSettingsService.h"
  #include "nsInterfaceHashtable.h"
+ #include "mozilla/Attributes.h"
 +#include "nsVoidArray.h"
 +#include "nsKDEUtils.h"
++
  
- class nsUnixSystemProxySettings : public nsISystemProxySettings {
+ class nsUnixSystemProxySettings MOZ_FINAL : public nsISystemProxySettings {
  public:
    NS_DECL_ISUPPORTS
    NS_DECL_NSISYSTEMPROXYSETTINGS
  
    nsUnixSystemProxySettings() {}
    nsresult Init();
-@@ -33,16 +35,17 @@ private:
+@@ -34,16 +37,17 @@ private:
    nsCOMPtr<nsIGSettingsService> mGSettings;
    nsCOMPtr<nsIGSettingsCollection> mProxySettings;
    nsInterfaceHashtable<nsCStringHashKey, nsIGSettingsCollection> mSchemeProxySettings;
    bool IsProxyMode(const char* aMode);
    nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult);
-   nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
-   nsresult GetProxyFromGSettings(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
+   nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, int32_t aPort, nsACString& aResult);
+   nsresult GetProxyFromGSettings(const nsACString& aScheme, const nsACString& aHost, int32_t aPort, nsACString& aResult);
    nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult);
 +  nsresult GetProxyFromKDE(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
  };
@@ -2105,12 +2106,12 @@
  nsUnixSystemProxySettings::Init()
  {
    // If this is a GNOME session, load gconf and try to use its preferences.
-@@ -495,16 +498,19 @@ nsUnixSystemProxySettings::GetProxyForUR
+@@ -496,16 +500,19 @@ nsUnixSystemProxySettings::GetProxyForUR
    nsCAutoString host;
    rv = aURI->GetHost(host);
    NS_ENSURE_SUCCESS(rv, rv);
  
-   PRInt32 port;
+   int32_t port;
    rv = aURI->GetPort(&port);
    NS_ENSURE_SUCCESS(rv, rv);
  
@@ -2125,7 +2126,7 @@
    if (mGConf)
      return GetProxyFromGConf(scheme, host, port, aResult);
  
-@@ -530,8 +536,34 @@ static const mozilla::Module::ContractID
+@@ -531,8 +538,34 @@ static const mozilla::Module::ContractID
  
  static const mozilla::Module kUnixProxyModule = {
    mozilla::Module::kVersion,
@@ -2936,7 +2937,7 @@
 +        {
 +        nsCString mimetype = output[ 0 ];
 +        nsRefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix( mimetype );
-+        NS_ENSURE_TRUE(mimeInfo, nsnull);
++        NS_ENSURE_TRUE(mimeInfo, nullptr);
 +        nsCString description = output[ 1 ];
 +        mimeInfo->SetDescription(NS_ConvertUTF8toUTF16(description));
 +        nsCString handlerAppName = output[ 2 ];
@@ -2946,7 +2947,7 @@
 +        NS_ADDREF((retval = mimeInfo));
 +        return retval;
 +        }
-+    return nsnull;
++    return nullptr;
 +}
 diff --git a/uriloader/exthandler/unix/nsKDERegistry.h b/uriloader/exthandler/unix/nsKDERegistry.h
 new file mode 100644
@@ -3049,11 +3050,11 @@
  
  #if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS)
    if (NS_FAILED(rv)){
-     HildonURIAction *action = hildon_uri_get_default_action(mSchemeOrType.get(), nsnull);
+     HildonURIAction *action = hildon_uri_get_default_action(mSchemeOrType.get(), nullptr);
      if (action) {
        nsCAutoString spec;
        aURI->GetAsciiSpec(spec);
-       if (hildon_uri_open(spec.get(), action, nsnull))
+       if (hildon_uri_open(spec.get(), action, nullptr))
 @@ -61,22 +64,22 @@ nsMIMEInfoUnix::LoadUriInternal(nsIURI *
  
    return rv;
@@ -3207,7 +3208,7 @@
                                    majorType,
 @@ -1391,17 +1391,17 @@ nsOSHelperAppService::GetFromType(const 
  #ifdef MOZ_WIDGET_GTK2
-   nsMIMEInfoBase *gnomeInfo = nsnull;
+   nsMIMEInfoBase *gnomeInfo = nullptr;
    if (handler.IsEmpty()) {
      // No useful data yet.  Check the GNOME registry.  Unfortunately, newer
      // GNOME versions no longer have type-to-extension mappings, so we might
@@ -3281,7 +3282,7 @@
  using namespace mozilla;
  
  #define MAX_PREVIEW_SIZE 180
-@@ -252,17 +254,19 @@ nsFilePicker::AppendFilters(PRInt32 aFil
+@@ -264,17 +266,19 @@ nsFilePicker::AppendFilters(int32_t aFil
    return nsBaseFilePicker::AppendFilters(aFilterMask);
  }
  
@@ -3302,34 +3303,34 @@
  
    mFilters.AppendElement(filter);
    mFilterNames.AppendElement(name);
-@@ -357,16 +361,19 @@ nsFilePicker::GetFiles(nsISimpleEnumerat
+@@ -369,16 +373,19 @@ nsFilePicker::GetFiles(nsISimpleEnumerat
    return NS_ERROR_FAILURE;
  }
  
  NS_IMETHODIMP
- nsFilePicker::Show(PRInt16 *aReturn)
+ nsFilePicker::Show(int16_t *aReturn)
  {
    NS_ENSURE_ARG_POINTER(aReturn);
  
 +  if( nsKDEUtils::kdeSupport())
 +    return kdeFileDialog(aReturn);
 +
-   nsXPIDLCString title;
-   title.Adopt(ToNewUTF8String(mTitle));
- 
-   GtkWindow *parent_widget = get_gtk_window_for_nsiwidget(mParentWidget);
+   nsresult rv = Open(nullptr);
+   if (NS_FAILED(rv))
+     return rv;
  
-   GtkFileChooserAction action = GetGtkFileChooserAction(mMode);
-   const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE)
-                                ? GTK_STOCK_SAVE : GTK_STOCK_OPEN;
-@@ -505,8 +512,234 @@ nsFilePicker::Show(PRInt16 *aReturn)
-     *aReturn = nsIFilePicker::returnCancel;
-     break;
+   while (mRunning) {
+     g_main_context_iteration(nullptr, TRUE);
    }
  
-   gtk_widget_destroy(file_chooser);
- 
-   return NS_OK;
+@@ -587,8 +594,235 @@ nsFilePicker::Done(GtkWidget* file_choos
+   if (mCallback) {
+     mCallback->Done(result);
+     mCallback = nullptr;
+   } else {
+     mResult = result;
+   }
+   NS_RELEASE_THIS();
  }
 +
 +nsCString nsFilePicker::kdeMakeFilter( int index )
@@ -3557,10 +3558,11 @@
 +        }
 +    return NS_OK;
 +    }
++
 diff --git a/widget/gtk2/nsFilePicker.h b/widget/gtk2/nsFilePicker.h
 --- a/widget/gtk2/nsFilePicker.h
 +++ b/widget/gtk2/nsFilePicker.h
-@@ -57,11 +57,17 @@ protected:
+@@ -67,11 +67,17 @@ protected:
    nsString  mDefault;
    nsString  mDefaultExtension;
  
@@ -3835,7 +3837,7 @@
      return NS_ERROR_FAILURE;
 @@ -1823,16 +1831,23 @@ nsLocalFile::Launch()
  
-     if (nsnull == connection)
+     if (nullptr == connection)
        return NS_ERROR_FAILURE;
  
      if (hildon_mime_open_file(connection, mPath.get()) != kHILDON_SUCCESS)
--- a/mozilla-ntlm-full-path.patch	Tue Sep 11 19:27:36 2012 +0200
+++ b/mozilla-ntlm-full-path.patch	Thu Sep 13 21:36:45 2012 +0200
@@ -1,12 +1,12 @@
 # HG changeset patch
 # User Petr Cerny <pcerny@novell.com>
-# Parent 4f5fe2278cd5cff898ad762457312f60a7e82a67
+# Parent 7308e4a7c1f769f4bbbc90870b849cadd99495a6
 Bug 634334 - call to the ntlm_auth helper fails
 
 diff --git a/extensions/auth/nsAuthSambaNTLM.cpp b/extensions/auth/nsAuthSambaNTLM.cpp
 --- a/extensions/auth/nsAuthSambaNTLM.cpp
 +++ b/extensions/auth/nsAuthSambaNTLM.cpp
-@@ -168,17 +168,17 @@ static PRUint8* ExtractMessage(const nsA
+@@ -168,17 +168,17 @@ static uint8_t* ExtractMessage(const nsA
  nsresult
  nsAuthSambaNTLM::SpawnNTLMAuthHelper()
  {
@@ -20,7 +20,7 @@
          "--helper-protocol", "ntlmssp-client-1",
          "--use-cached-creds",
          "--username", username,
-         nsnull
+         nullptr
      };
  
      bool isOK = SpawnIOChild(const_cast<char* const*>(args), &mChildPID, &mFromChildFD, &mToChildFD);
--- a/mozilla-pkgconfig.patch	Tue Sep 11 19:27:36 2012 +0200
+++ b/mozilla-pkgconfig.patch	Thu Sep 13 21:36:45 2012 +0200
@@ -4,7 +4,7 @@
 diff --git a/xulrunner/installer/Makefile.in b/xulrunner/installer/Makefile.in
 --- a/xulrunner/installer/Makefile.in
 +++ b/xulrunner/installer/Makefile.in
-@@ -69,16 +69,19 @@ ifndef MOZ_PLATFORM_MAEMO
+@@ -39,16 +39,19 @@ ifndef MOZ_PLATFORM_MAEMO
  GENERATE_CACHE = 1
  endif
  
@@ -14,7 +14,7 @@
  # Add pkg-config files to the install:: target
  
 +# the apilibdir always ends with 1.9 as every patch update will provide a link
-+apilibdir = $(dir $(installdir))xulrunner-16
++apilibdir = $(dir $(installdir))xulrunner-17
 +
  pkg_config_files = \
  	libxul.pc \
@@ -24,7 +24,7 @@
  	$(NULL)
  
  ifdef MOZ_NATIVE_NSPR
-@@ -106,16 +109,17 @@ pkg_config_files += mozilla-nss.pc
+@@ -76,16 +79,17 @@ pkg_config_files += mozilla-nss.pc
  endif
  
  %.pc: $(srcdir)/%.pc.in $(GLOBAL_DEPS)
--- a/mozilla-prefer_plugin_pref.patch	Tue Sep 11 19:27:36 2012 +0200
+++ b/mozilla-prefer_plugin_pref.patch	Thu Sep 13 21:36:45 2012 +0200
@@ -4,15 +4,15 @@
 diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp
 --- a/dom/plugins/base/nsPluginHost.cpp
 +++ b/dom/plugins/base/nsPluginHost.cpp
-@@ -1561,17 +1561,45 @@ nsPluginHost::FindPluginForType(const ch
-                                 bool aCheckEnabled)
- {
+@@ -1588,17 +1588,51 @@ nsPluginHost::FindPluginForType(const ch
    if (!aMimeType) {
-     return nsnull;
+     return nullptr;
    }
  
    LoadPlugins();
  
+   InfallibleTArray<nsPluginTag*> matchingPlugins;
+ 
 +  char *preferredPluginPath = NULL;
 +  nsCAutoString mimetypePrefString ("modules.plugins.mimetype.");
 +  mimetypePrefString.Append(aMimeType);
@@ -23,30 +23,36 @@
    nsPluginTag *plugin = mPlugins;
 +
 +  if(preferredPluginPath) {
-+    while (nsnull != plugin) {
-+      if (0 == PL_strcasecmp(plugin->mFileName.get(), preferredPluginPath) ||
-+          0 == PL_strcasecmp(plugin->mFullPath.get(), preferredPluginPath)) {
-+        return plugin;
++    while (plugin) {
++      if (!aCheckEnabled || plugin->IsEnabled()) {
++        if (0 == PL_strcasecmp(plugin->mFileName.get(), preferredPluginPath) ||
++            0 == PL_strcasecmp(plugin->mFullPath.get(), preferredPluginPath)) {
++          matchingPlugins.AppendElement(plugin);
++        }
 +      }
 +      plugin = plugin->mNext;
 +    }
 +
 +    // now lets search for substrings
 +    plugin = mPlugins;
-+    while (nsnull != plugin) {
-+      if (nsnull != PL_strstr(plugin->mFileName.get(), preferredPluginPath) ||
-+          nsnull != PL_strstr(plugin->mFullPath.get(), preferredPluginPath)) {
-+        return plugin;
++    while (plugin) {
++      if (!aCheckEnabled || plugin->IsEnabled()) {
++        if (nullptr != PL_strstr(plugin->mFileName.get(), preferredPluginPath) ||
++            nullptr != PL_strstr(plugin->mFullPath.get(), preferredPluginPath)) {
++          matchingPlugins.AppendElement(plugin);
++        }
 +      }
 +      plugin = plugin->mNext;
 +    }
++
++    return FindPreferredPlugin(matchingPlugins);
 +  }
 +
    while (plugin) {
      if (!aCheckEnabled || plugin->IsEnabled()) {
-       PRInt32 mimeCount = plugin->mMimeTypes.Length();
-       for (PRInt32 i = 0; i < mimeCount; i++) {
+       int32_t mimeCount = plugin->mMimeTypes.Length();
+       for (int32_t i = 0; i < mimeCount; i++) {
          if (0 == PL_strcasecmp(plugin->mMimeTypes[i].get(), aMimeType)) {
-           return plugin;
+           matchingPlugins.AppendElement(plugin);
+           break;
          }
-       }
--- a/mozilla-shared-nss-db.patch	Tue Sep 11 19:27:36 2012 +0200
+++ b/mozilla-shared-nss-db.patch	Thu Sep 13 21:36:45 2012 +0200
@@ -4,34 +4,10 @@
          (can be disabled by exporting MOZ_XRE_NO_NSSHELPER=1)
 References:
 
-diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in
---- a/config/autoconf.mk.in
-+++ b/config/autoconf.mk.in
-@@ -540,16 +540,20 @@ MOZ_ENABLE_LIBNOTIFY	= @MOZ_ENABLE_LIBNO
- 
- MOZ_ALSA_LIBS           = @MOZ_ALSA_LIBS@
- MOZ_ALSA_CFLAGS         = @MOZ_ALSA_CFLAGS@
- 
- GLIB_CFLAGS	= @GLIB_CFLAGS@
- GLIB_LIBS	= @GLIB_LIBS@
- GLIB_GMODULE_LIBS	= @GLIB_GMODULE_LIBS@
- 
-+MOZ_ENABLE_NSSHELPER = @MOZ_ENABLE_NSSHELPER@
-+NSSHELPER_CFLAGS = @NSSHELPER_CFLAGS@
-+NSSHELPER_LIBS = @NSSHELPER_LIBS@
-+
- MOZ_NATIVE_MAKEDEPEND	= @MOZ_NATIVE_MAKEDEPEND@
- 
- CL_INCLUDES_PREFIX = @CL_INCLUDES_PREFIX@
- 
- MOZ_AUTO_DEPS	= @MOZ_AUTO_DEPS@
- COMPILER_DEPEND = @COMPILER_DEPEND@
- MDDEPDIR        := @MDDEPDIR@
- CC_WRAPPER = @CC_WRAPPER@
 diff --git a/configure.in b/configure.in
 --- a/configure.in
 +++ b/configure.in
-@@ -8052,16 +8052,31 @@ AC_SUBST(QCMS_LIBS)
+@@ -7987,16 +7987,31 @@ AC_SUBST(QCMS_LIBS)
  
  dnl ========================================================
  dnl HarfBuzz
@@ -107,7 +83,7 @@
  #include "nsNetUtil.h"
  #include "nsAppDirectoryServiceDefs.h"
  #include "nsDirectoryService.h"
-@@ -1740,18 +1747,34 @@ nsNSSComponent::InitializeNSS(bool showW
+@@ -1731,18 +1738,34 @@ nsNSSComponent::InitializeNSS(bool showW
      ConfigureInternalPKCS11Token();
  
      // The NSS_INIT_NOROOTINIT flag turns off the loading of the root certs
@@ -115,7 +91,7 @@
      // 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".
-     PRUint32 init_flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE;
+     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;
@@ -147,7 +123,7 @@
 diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in
 --- a/toolkit/library/Makefile.in
 +++ b/toolkit/library/Makefile.in
-@@ -441,17 +441,17 @@ EXTRA_DSO_LDOPTS += -INCREMENTAL:NO
+@@ -443,17 +443,17 @@ EXTRA_DSO_LDOPTS += -INCREMENTAL:NO
  endif
  endif
  endif