mozilla-kde.patch
branchfirefox40
changeset 868 284da266ec46
parent 850 a2bdff616a0e
child 869 0dd25a92df97
--- a/mozilla-kde.patch	Sat Jul 18 14:48:41 2015 +0200
+++ b/mozilla-kde.patch	Sat Jul 18 15:01:59 2015 +0200
@@ -1,5 +1,5 @@
 # HG changeset patch
-# Parent  214f99f3ce4f1f8ae9b3d18da44e5d66b3105663
+# Parent  372d46509a8899feb3473becff869159d01f1f4c
 Description: Add KDE integration to Firefox (toolkit parts)
 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
 Author: Lubos Lunak <lunak@suse.com>
@@ -46,7 +46,7 @@
  #include "prefread.h"
  #include "prefapi_private_data.h"
  
-@@ -1165,16 +1166,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
+@@ -1154,16 +1155,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
  
  static nsresult pref_LoadPrefsInDirList(const char *listId)
  {
@@ -81,7 +81,7 @@
      return NS_OK;
  
    bool hasMore;
-@@ -1190,17 +1209,17 @@ static nsresult pref_LoadPrefsInDirList(
+@@ -1179,17 +1198,17 @@ static nsresult pref_LoadPrefsInDirList(
  
      nsAutoCString leaf;
      path->GetNativeLeafName(leaf);
@@ -100,7 +100,7 @@
  {
    nsZipItemPtr<char> manifest(jarReader, name, true);
    NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
-@@ -1294,26 +1313,38 @@ static nsresult pref_InitInitialObjects(
+@@ -1283,26 +1302,38 @@ 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)
@@ -184,7 +184,7 @@
 diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build
 --- a/toolkit/components/downloads/moz.build
 +++ b/toolkit/components/downloads/moz.build
-@@ -52,14 +52,15 @@ if not CONFIG['MOZ_SUITE']:
+@@ -67,14 +67,15 @@ if not CONFIG['MOZ_SUITE']:
      ]
  
  FAIL_ON_WARNINGS = True
@@ -225,7 +225,7 @@
  #include "AndroidBridge.h"
  #endif
  
-@@ -2716,16 +2720,25 @@ nsDownload::SetState(DownloadState aStat
+@@ -2711,16 +2715,25 @@ nsDownload::SetState(DownloadState aStat
        nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID));
  
        // Master pref to control this function.
@@ -251,7 +251,7 @@
          int64_t goat = PR_Now() - mStartTime;
          showTaskbarAlert = goat > alertIntervalUSec;
  
-@@ -2756,16 +2769,17 @@ nsDownload::SetState(DownloadState aStat
+@@ -2751,16 +2764,17 @@ nsDownload::SetState(DownloadState aStat
                    NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title,
                    message, !removeWhenDone,
                    mPrivate ? NS_LITERAL_STRING("private") : NS_LITERAL_STRING("non-private"),
@@ -272,7 +272,7 @@
 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
 --- a/toolkit/content/jar.mn
 +++ b/toolkit/content/jar.mn
-@@ -57,29 +57,33 @@ toolkit.jar:
+@@ -60,29 +60,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)
@@ -310,7 +310,7 @@
 new file mode 100644
 --- /dev/null
 +++ b/toolkit/content/widgets/dialog-kde.xml
-@@ -0,0 +1,455 @@
+@@ -0,0 +1,460 @@
 +<?xml version="1.0"?>
 +<!-- This Source Code Form is subject to the terms of the Mozilla Public
 +   - License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -344,7 +344,7 @@
 +        <xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/>
 +#elif XP_UNIX
 +                >
-+        <xul:button dlgtype="help" class="dialog-button" hidden="true"/>
++	<xul:button dlgtype="help" class="dialog-button" hidden="true"/>
 +	<xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
 +	<xul:spacer anonid="spacer" flex="1"/>
 +	<xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/>
@@ -426,11 +426,16 @@
 +            sizeToContent();
 +          }
 +
-+          var xOffset = (opener.outerWidth - window.outerWidth) / 2;
-+          var yOffset = opener.outerHeight / 5;
++          if (opener) {
++            var xOffset = (opener.outerWidth - window.outerWidth) / 2;
++            var yOffset = opener.outerHeight / 5;
 +
-+          var newX = opener.screenX + xOffset;
-+          var newY = opener.screenY + yOffset;
++            var newX = opener.screenX + xOffset;
++            var newY = opener.screenY + yOffset;
++          } else {
++            newX = (screen.availWidth - window.outerWidth) / 2;
++            newY = (screen.availHeight - window.outerHeight) / 2;
++          }
 +
 +          // ensure the window is fully onscreen (if smaller than the screen)
 +          if (newX < screen.availLeft)
@@ -770,7 +775,7 @@
 new file mode 100644
 --- /dev/null
 +++ b/toolkit/content/widgets/preferences-kde.xml
-@@ -0,0 +1,1350 @@
+@@ -0,0 +1,1357 @@
 +<?xml version="1.0"?>
 +
 +<!DOCTYPE bindings [
@@ -1394,9 +1399,11 @@
 +      <constructor>
 +      <![CDATA[
 +        if (this.type != "child") {
-+          var psvc = Components.classes["@mozilla.org/preferences-service;1"]
-+                               .getService(Components.interfaces.nsIPrefBranch);
-+          this.instantApply = psvc.getBoolPref("browser.preferences.instantApply");
++          if (!this._instantApplyInitialized) {
++            let psvc = Components.classes["@mozilla.org/preferences-service;1"]
++                                 .getService(Components.interfaces.nsIPrefBranch);
++            this.instantApply = psvc.getBoolPref("browser.preferences.instantApply");
++          }
 +          if (this.instantApply) {
 +            var docElt = document.documentElement;
 +            var acceptButton = docElt.getButton("accept");
@@ -1466,8 +1473,13 @@
 +      ]]>
 +      </destructor>
 +
++      <!-- Derived bindings can set this to true to cause us to skip
++           reading the browser.preferences.instantApply pref in the constructor.
++           Then they can set instantApply to their wished value. -->
++      <field name="_instantApplyInitialized">false</field>
++      <!-- Controls whether changed pref values take effect immediately. -->
 +      <field name="instantApply">false</field>
-+      
++
 +      <property name="preferencePanes"
 +                onget="return this.getElementsByTagName('prefpane');"/>
 +
@@ -3466,7 +3478,7 @@
 diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp
 --- a/xpcom/components/ManifestParser.cpp
 +++ b/xpcom/components/ManifestParser.cpp
-@@ -34,16 +34,17 @@
+@@ -35,16 +35,17 @@
  
  #include "nsIConsoleService.h"
  #include "nsIScriptError.h"
@@ -3484,7 +3496,7 @@
  #define XPTONLY_MANIFEST nullptr
  #define XPTONLY_XPT nullptr
  #endif
-@@ -489,16 +490,17 @@ ParseManifest(NSLocationType aType, File
+@@ -494,16 +495,17 @@ ParseManifest(NSLocationType aType, File
    NS_NAMED_LITERAL_STRING(kRemoteEnabled, "remoteenabled");
    NS_NAMED_LITERAL_STRING(kRemoteRequired, "remoterequired");
    NS_NAMED_LITERAL_STRING(kApplication, "application");
@@ -3502,7 +3514,7 @@
    NS_NAMED_LITERAL_STRING(kMain, "main");
    NS_NAMED_LITERAL_STRING(kContent, "content");
  
-@@ -549,44 +551,49 @@ ParseManifest(NSLocationType aType, File
+@@ -554,44 +556,49 @@ ParseManifest(NSLocationType aType, File
          CopyUTF8toUTF16(s, abi);
          abi.Insert(char16_t('_'), 0);
          abi.Insert(osTarget, 0);
@@ -3552,7 +3564,7 @@
      process = kMain;
    }
  
-@@ -681,25 +688,27 @@ ParseManifest(NSLocationType aType, File
+@@ -694,25 +701,27 @@ ParseManifest(NSLocationType aType, File
      TriState stOsVersion = eUnspecified;
      TriState stOs = eUnspecified;
      TriState stABI = eUnspecified;
@@ -3580,7 +3592,7 @@
        }
  
  #if defined(MOZ_WIDGET_ANDROID)
-@@ -749,16 +758,17 @@ ParseManifest(NSLocationType aType, File
+@@ -762,16 +771,17 @@ ParseManifest(NSLocationType aType, File
      }
  
      if (!ok ||
@@ -3601,7 +3613,7 @@
 diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build
 --- a/xpcom/components/moz.build
 +++ b/xpcom/components/moz.build
-@@ -48,12 +48,13 @@ FINAL_LIBRARY = 'xul'
+@@ -46,12 +46,13 @@ FINAL_LIBRARY = 'xul'
  GENERATED_INCLUDES += ['..']
  LOCAL_INCLUDES += [
      '../base',
@@ -3636,7 +3648,7 @@
  #include "prmem.h"
  #include "plbase64.h"
  
-@@ -1964,42 +1965,52 @@ nsLocalFile::SetPersistentDescriptor(con
+@@ -1960,42 +1961,52 @@ nsLocalFile::SetPersistentDescriptor(con
    return InitWithNativePath(aPersistentDescriptor);
  #endif
  }
@@ -3695,7 +3707,7 @@
      return rv;
    }
    return NS_ERROR_FAILURE;
-@@ -2007,16 +2018,22 @@ nsLocalFile::Reveal()
+@@ -2003,16 +2014,22 @@ nsLocalFile::Reveal()
    return NS_ERROR_FAILURE;
  #endif
  }