Backed out changeset 5f9c7cd773a5 (bug 1096093) for bustage on a CLOSED TREE
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 23 Apr 2015 17:18:52 +0200
changeset 240759 d13a8cde569594f9966cb74e8776c502b10db62a
parent 240758 805d4233dc4b00f792298eace3199ec3cd5fa2c0
child 240760 0c7ab04d4666b13984903ad6a99f9854bfc5d351
push id28644
push userryanvm@gmail.com
push dateThu, 23 Apr 2015 21:10:29 +0000
treeherdermozilla-central@22a157f7feb7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1096093
milestone40.0a1
backs out5f9c7cd773a5826d2621601e4f4ee3581d656764
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 5f9c7cd773a5 (bug 1096093) for bustage on a CLOSED TREE
dom/ipc/ContentChild.cpp
dom/ipc/ContentParent.cpp
dom/ipc/ContentParent.h
dom/ipc/PContent.ipdl
widget/LookAndFeel.h
widget/WidgetMessageUtils.h
widget/moz.build
widget/nsXPLookAndFeel.cpp
widget/nsXPLookAndFeel.h
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -18,17 +18,16 @@
 #include "CrashReporterChild.h"
 #include "GeckoProfiler.h"
 #include "TabChild.h"
 
 #include "mozilla/Attributes.h"
 #ifdef ACCESSIBILITY
 #include "mozilla/a11y/DocAccessibleChild.h"
 #endif
-#include "mozilla/LookAndFeel.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/ProcessHangMonitorIPC.h"
 #include "mozilla/docshell/OfflineCacheUpdateChild.h"
 #include "mozilla/dom/ContentBridgeChild.h"
 #include "mozilla/dom/ContentBridgeParent.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/DataTransfer.h"
 #include "mozilla/dom/DOMStorageIPC.h"
@@ -49,17 +48,16 @@
 #include "mozilla/jsipc/CrossProcessObjectWrappers.h"
 #include "mozilla/layers/CompositorChild.h"
 #include "mozilla/layers/ImageBridgeChild.h"
 #include "mozilla/layers/PCompositorChild.h"
 #include "mozilla/layers/SharedBufferManagerChild.h"
 #include "mozilla/net/NeckoChild.h"
 #include "mozilla/plugins/PluginInstanceParent.h"
 #include "mozilla/plugins/PluginModuleParent.h"
-#include "mozilla/widget/WidgetMessageUtils.h"
 
 #if defined(MOZ_CONTENT_SANDBOX)
 #if defined(XP_WIN)
 #define TARGET_SANDBOX_EXPORTS
 #include "mozilla/sandboxTarget.h"
 #elif defined(XP_LINUX)
 #include "mozilla/Sandbox.h"
 #include "mozilla/SandboxInfo.h"
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -71,17 +71,16 @@
 #include "mozilla/ipc/FileDescriptorUtils.h"
 #include "mozilla/ipc/PFileDescriptorSetParent.h"
 #include "mozilla/ipc/TestShellParent.h"
 #include "mozilla/ipc/InputStreamUtils.h"
 #include "mozilla/jsipc/CrossProcessObjectWrappers.h"
 #include "mozilla/layers/CompositorParent.h"
 #include "mozilla/layers/ImageBridgeParent.h"
 #include "mozilla/layers/SharedBufferManagerParent.h"
-#include "mozilla/LookAndFeel.h"
 #include "mozilla/net/NeckoParent.h"
 #include "mozilla/plugins/PluginBridge.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/ProcessHangMonitor.h"
 #include "mozilla/ProcessHangMonitorIPC.h"
 #include "mozilla/Services.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/Telemetry.h"
@@ -2883,17 +2882,16 @@ ContentParent::RecvAddNewProcess(const u
         mozilla::unused << content->SendPreferenceUpdate(sNuwaPrefUpdates->ElementAt(i));
     }
 
     // Update offline settings.
     bool isOffline, isLangRTL;
     InfallibleTArray<nsString> unusedDictionaries;
     ClipboardCapabilities clipboardCaps;
     DomainPolicyClone domainPolicy;
-
     RecvGetXPCOMProcessAttributes(&isOffline, &isLangRTL, &unusedDictionaries,
                                   &clipboardCaps, &domainPolicy);
     mozilla::unused << content->SendSetOffline(isOffline);
     MOZ_ASSERT(!clipboardCaps.supportsSelectionClipboard() &&
                !clipboardCaps.supportsFindClipboard(),
                "Unexpected values");
 
     PreallocatedProcessManager::PublishSpareProcess(content);
@@ -4035,23 +4033,16 @@ ContentParent::RecvGetSystemMemory(const
 #endif
 
     unused << SendSystemMemoryAvailable(aGetterId, memoryTotal);
 
     return true;
 }
 
 bool
-ContentParent::RecvGetLookAndFeelCache(nsTArray<LookAndFeelInt>&& aLookAndFeelIntCache)
-{
-    aLookAndFeelIntCache = LookAndFeel::GetIntCache();
-    return true;
-}
-
-bool
 ContentParent::RecvIsSecureURI(const uint32_t& type,
                                const URIParams& uri,
                                const uint32_t& flags,
                                bool* isSecureURI)
 {
     nsCOMPtr<nsISiteSecurityService> sss(do_GetService(NS_SSSERVICE_CONTRACTID));
     if (!sss) {
         return false;
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -538,17 +538,18 @@ private:
 
     virtual bool RecvGetProcessAttributes(ContentParentId* aCpId,
                                           bool* aIsForApp,
                                           bool* aIsForBrowser) override;
     virtual bool RecvGetXPCOMProcessAttributes(bool* aIsOffline,
                                                bool* aIsLangRTL,
                                                InfallibleTArray<nsString>* dictionaries,
                                                ClipboardCapabilities* clipboardCaps,
-                                               DomainPolicyClone* domainPolicy) override;
+                                               DomainPolicyClone* domainPolicy)
+        override;
 
     virtual bool DeallocPJavaScriptParent(mozilla::jsipc::PJavaScriptParent*) override;
 
     virtual bool DeallocPRemoteSpellcheckEngineParent(PRemoteSpellcheckEngineParent*) override;
     virtual PBrowserParent* AllocPBrowserParent(const TabId& aTabId,
                                                 const IPCTabContext& aContext,
                                                 const uint32_t& aChromeFlags,
                                                 const ContentParentId& aCpId,
@@ -750,18 +751,16 @@ private:
                                                 const bool& aWithVideo) override;
 
     virtual bool RecvAudioChannelChangedNotification() override;
 
     virtual bool RecvAudioChannelChangeDefVolChannel(const int32_t& aChannel,
                                                      const bool& aHidden) override;
     virtual bool RecvGetSystemMemory(const uint64_t& getterId) override;
 
-    virtual bool RecvGetLookAndFeelCache(nsTArray<LookAndFeelInt>&& aLookAndFeelIntCache) override;
-
     virtual bool RecvDataStoreGetStores(
                        const nsString& aName,
                        const nsString& aOwner,
                        const IPC::Principal& aPrincipal,
                        InfallibleTArray<DataStoreSetting>* aValue) override;
 
     virtual bool RecvSpeakerManagerGetSpeakerStatus(bool* aValue) override;
 
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -82,17 +82,16 @@ using mozilla::dom::asmjscache::WritePar
 using mozilla::dom::AudioChannel from "mozilla/dom/AudioChannelBinding.h";
 using mozilla::dom::AudioChannelState from "AudioChannelCommon.h";
 using mozilla::dom::NativeThreadId from "mozilla/dom/TabMessageUtils.h";
 using mozilla::dom::quota::PersistenceType from "mozilla/dom/quota/PersistenceType.h";
 using mozilla::hal::ProcessPriority from "mozilla/HalTypes.h";
 using gfxIntSize from "nsSize.h";
 using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";
 using mozilla::dom::ContentParentId from "mozilla/dom/ipc/IdType.h";
-using struct LookAndFeelInt from "mozilla/widget/WidgetMessageUtils.h";
 
 union ChromeRegistryItem
 {
     ChromePackage;
     OverrideMapping;
     ResourceMapping;
 };
 
@@ -686,18 +685,16 @@ parent:
     sync GetRandomValues(uint32_t length)
         returns (uint8_t[] randomValues);
 
     async GetSystemMemory(uint64_t getterId);
 
     sync IsSecureURI(uint32_t type, URIParams uri, uint32_t flags)
         returns (bool isSecureURI);
 
-    sync GetLookAndFeelCache(LookAndFeelInt[] lookAndFeelIntCache);
-
     PHal();
 
     PIcc(uint32_t serviceId);
 
     PMobileConnection(uint32_t clientId);
 
     PNecko();
 
--- a/widget/LookAndFeel.h
+++ b/widget/LookAndFeel.h
@@ -10,22 +10,16 @@
 #error "This header is only usable from within libxul (MOZILLA_INTERNAL_API)."
 #endif
 
 #include "nsDebug.h"
 #include "nsColor.h"
 
 struct gfxFontStyle;
 
-struct LookAndFeelInt
-{
-  int32_t id;
-  int32_t value;
-};
-
 namespace mozilla {
 
 class LookAndFeel
 {
 public:
   // When modifying this list, also modify nsXPLookAndFeel::sColorPrefs
   // in widget/xpwidgts/nsXPLookAndFeel.cpp.
   enum ColorID {
@@ -584,23 +578,16 @@ public:
    */
   static uint32_t GetPasswordMaskDelay();
 
   /**
    * When system look and feel is changed, Refresh() must be called.  Then,
    * cached data would be released.
    */
   static void Refresh();
-
-  /**
-   * If the implementation is caching values, these accessors allow the
-   * cache to be exported and imported.
-   */
-  static nsTArray<LookAndFeelInt> GetIntCache();
-  static void SetIntCache(const nsTArray<LookAndFeelInt>& aLookAndFeelIntCache);
 };
 
 } // namespace mozilla
 
 // On the Mac, GetColor(eColorID_TextSelectForeground, color) returns this
 // constant to specify that the foreground color should not be changed
 // (ie. a colored text keeps its colors  when selected).
 // Of course if other plaforms work like the Mac, they can use it too.
deleted file mode 100644
--- a/widget/WidgetMessageUtils.h
+++ /dev/null
@@ -1,39 +0,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
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_WidgetMessageUtils_h
-#define mozilla_WidgetMessageUtils_h
-
-#include "ipc/IPCMessageUtils.h"
-#include "mozilla/LookAndFeel.h"
-
-namespace IPC {
-
-template<>
-struct ParamTraits<LookAndFeelInt>
-{
-  typedef LookAndFeelInt paramType;
-
-  static void Write(Message* aMsg, const paramType& aParam)
-  {
-    WriteParam(aMsg, aParam.id);
-    WriteParam(aMsg, aParam.value);
-  }
-
-  static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
-  {
-    int32_t id, value;
-    if (ReadParam(aMsg, aIter, &id) &&
-        ReadParam(aMsg, aIter, &value)) {
-      aResult->id = id;
-      aResult->value = value;
-      return true;
-    }
-    return false;
-  }
-};
-
-} // namespace IPC
-
-#endif // WidgetMessageUtils_h
\ No newline at end of file
--- a/widget/moz.build
+++ b/widget/moz.build
@@ -128,17 +128,16 @@ EXPORTS.mozilla += [
     'TextRange.h',
     'TouchEvents.h',
     'VsyncDispatcher.h',
     'WidgetUtils.h',
 ]
 
 EXPORTS.mozilla.widget += [
     'PuppetBidiKeyboard.h',
-    'WidgetMessageUtils.h',
 ]
 
 UNIFIED_SOURCES += [
     'ContentHelper.cpp',
     'GfxDriverInfo.cpp',
     'GfxInfoBase.cpp',
     'GfxInfoCollector.cpp',
     'GfxInfoWebGL.cpp',
--- a/widget/nsXPLookAndFeel.cpp
+++ b/widget/nsXPLookAndFeel.cpp
@@ -8,17 +8,16 @@
 #include "nscore.h"
 
 #include "nsXPLookAndFeel.h"
 #include "nsLookAndFeel.h"
 #include "nsCRT.h"
 #include "nsFont.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/gfx/2D.h"
-#include "mozilla/widget/WidgetMessageUtils.h"
 
 #include "gfxPlatform.h"
 #include "qcms.h"
 
 #ifdef DEBUG
 #include "nsSize.h"
 #endif
 
@@ -449,25 +448,16 @@ nsXPLookAndFeel::Init()
   for (i = 0; i < ArrayLength(sColorPrefs); ++i) {
     InitColorFromPref(i);
   }
 
   bool val;
   if (NS_SUCCEEDED(Preferences::GetBool("ui.use_native_colors", &val))) {
     sUseNativeColors = val;
   }
-
-  if (XRE_GetProcessType() == GeckoProcessType_Content) {
-    mozilla::dom::ContentChild* cc =
-      mozilla::dom::ContentChild::GetSingleton();
-
-    nsTArray<LookAndFeelInt> lookAndFeelIntCache;
-    cc->SendGetLookAndFeelCache(lookAndFeelIntCache);
-    LookAndFeel::SetIntCache(lookAndFeelIntCache);
-  }
 }
 
 nsXPLookAndFeel::~nsXPLookAndFeel()
 {
   NS_ASSERTION(sInstance == this,
                "This destroying instance isn't the singleton instance");
   sInstance = nullptr;
 }
@@ -708,22 +698,16 @@ nsXPLookAndFeel::RefreshImpl()
   // Wipe out our color cache.
   uint32_t i;
   for (i = 0; i < eColorID_LAST_COLOR; i++)
     sCachedColors[i] = 0;
   for (i = 0; i < COLOR_CACHE_SIZE; i++)
     sCachedColorBits[i] = 0;
 }
 
-nsTArray<LookAndFeelInt>
-nsXPLookAndFeel::GetIntCacheImpl()
-{
-  return nsTArray<LookAndFeelInt>();
-}
-
 namespace mozilla {
 
 // static
 nsresult
 LookAndFeel::GetColor(ColorID aID, nscolor* aResult)
 {
   return nsLookAndFeel::GetInstance()->GetColorImpl(aID, *aResult);
 }
@@ -774,23 +758,9 @@ LookAndFeel::GetPasswordMaskDelay()
 
 // static
 void
 LookAndFeel::Refresh()
 {
   nsLookAndFeel::GetInstance()->RefreshImpl();
 }
 
-// static
-nsTArray<LookAndFeelInt>
-LookAndFeel::GetIntCache()
-{
-  return nsLookAndFeel::GetInstance()->GetIntCacheImpl();
-}
-
-// static
-void
-LookAndFeel::SetIntCache(const nsTArray<LookAndFeelInt>& aLookAndFeelIntCache)
-{
-  return nsLookAndFeel::GetInstance()->SetIntCacheImpl(aLookAndFeelIntCache);
-}
-
 } // namespace mozilla
--- a/widget/nsXPLookAndFeel.h
+++ b/widget/nsXPLookAndFeel.h
@@ -2,17 +2,16 @@
 /* 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
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef __nsXPLookAndFeel
 #define __nsXPLookAndFeel
 
 #include "mozilla/LookAndFeel.h"
-#include "nsTArray.h"
 
 class nsLookAndFeel;
 
 struct nsLookAndFeelIntPref
 {
   const char* name;
   mozilla::LookAndFeel::IntID id;
   bool isSet;
@@ -75,19 +74,16 @@ public:
     return false;
   }
 
   virtual uint32_t GetPasswordMaskDelayImpl()
   {
     return 600;
   }
 
-  virtual nsTArray<LookAndFeelInt> GetIntCacheImpl();
-  virtual void SetIntCacheImpl(const nsTArray<LookAndFeelInt>& aLookAndFeelIntCache) {}
-
 protected:
   nsXPLookAndFeel();
 
   static void IntPrefChanged(nsLookAndFeelIntPref *data);
   static void FloatPrefChanged(nsLookAndFeelFloatPref *data);
   static void ColorPrefChanged(unsigned int index, const char *prefName);
   void InitFromPref(nsLookAndFeelIntPref* aPref);
   void InitFromPref(nsLookAndFeelFloatPref* aPref);