From 19850f7261c019f35fdf440edbf0e77e30053f44 Mon Sep 17 00:00:00 2001 From: Shu-yu Guo Date: Mon, 2 Dec 2013 20:43:56 -0800 Subject: [PATCH 01/25] Bug 942480 - Fix OOM handling in Debugger construction. r=jimb --- js/src/vm/Debugger.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp index c426d29fa0d..6548b7312de 100644 --- a/js/src/vm/Debugger.cpp +++ b/js/src/vm/Debugger.cpp @@ -398,14 +398,14 @@ Debugger::Debugger(JSContext *cx, JSObject *dbg) Debugger::~Debugger() { - JS_ASSERT(debuggees.empty()); - - /* This always happens in the GC thread, so no locking is required. */ - JS_ASSERT(object->runtimeFromMainThread()->isHeapBusy()); + JS_ASSERT_IF(debuggees.initialized(), debuggees.empty()); /* * Since the inactive state for this link is a singleton cycle, it's always * safe to apply JS_REMOVE_LINK to it, regardless of whether we're in the list or not. + * + * We don't have to worry about locking here since Debugger is not + * background finalized. */ JS_REMOVE_LINK(&onNewGlobalObjectWatchersLink); } @@ -1684,7 +1684,6 @@ Debugger::finalize(FreeOp *fop, JSObject *obj) Debugger *dbg = fromJSObject(obj); if (!dbg) return; - JS_ASSERT(dbg->debuggees.empty()); fop->delete_(dbg); } From 8a825633a59598ef33486eb9485fe138d5be7383 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Sun, 8 Dec 2013 15:53:28 -0800 Subject: [PATCH 02/25] Bug 942480: Don't js_delete a freshly allocated js::Debugger, if we've stored it in the Debugger JSObject's private slot. r=shu --- js/src/vm/Debugger.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp index 6548b7312de..f7ad7777f72 100644 --- a/js/src/vm/Debugger.cpp +++ b/js/src/vm/Debugger.cpp @@ -2126,14 +2126,16 @@ Debugger::construct(JSContext *cx, unsigned argc, Value *vp) for (unsigned slot = JSSLOT_DEBUG_PROTO_START; slot < JSSLOT_DEBUG_PROTO_STOP; slot++) obj->setReservedSlot(slot, proto->getReservedSlot(slot)); + /* Construct the underlying C++ object. */ Debugger *dbg = cx->new_(cx, obj.get()); if (!dbg) return false; - obj->setPrivate(dbg); if (!dbg->init(cx)) { js_delete(dbg); return false; } + obj->setPrivate(dbg); + /* Now the JSObject owns the js::Debugger instance, so we needn't delete it. */ /* Add the initial debuggees, if any. */ for (unsigned i = 0; i < argc; i++) { From 0039a302f95e73bdd01ac3c3b05ad1103e6f6a90 Mon Sep 17 00:00:00 2001 From: Brian Birtles Date: Mon, 9 Dec 2013 08:55:17 +0900 Subject: [PATCH 03/25] Bug 946529 - Fix bug in transform parsing mochitest; r=longsonr --- .../content/test/test_transformParsing.html | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/content/svg/content/test/test_transformParsing.html b/content/svg/content/test/test_transformParsing.html index 0c12d5945af..676167b86c8 100644 --- a/content/svg/content/test/test_transformParsing.html +++ b/content/svg/content/test/test_transformParsing.html @@ -65,23 +65,23 @@ function checkParseOk(spec, expected) { function checkTransform(transform, expected, spec, index) { var typeMapping = { "unknown": SVGTransform.SVG_TRANSFORM_UNKNOWN, - "matrix": SVGTransform.SVG_TRANSFORM_UNKNOWN, - "translate": SVGTransform.SVG_TRANSFORM_UNKNOWN, - "scale": SVGTransform.SVG_TRANSFORM_UNKNOWN, - "rotate": SVGTransform.SVG_TRANSFORM_UNKNOWN, - "skewx": SVGTransform.SVG_TRANSFORM_UNKNOWN, - "skewy": SVGTransform.SVG_TRANSFORM_UNKNOWN + "matrix": SVGTransform.SVG_TRANSFORM_MATRIX, + "translate": SVGTransform.SVG_TRANSFORM_TRANSLATE, + "scale": SVGTransform.SVG_TRANSFORM_SCALE, + "rotate": SVGTransform.SVG_TRANSFORM_ROTATE, + "skewx": SVGTransform.SVG_TRANSFORM_SKEWX, + "skewy": SVGTransform.SVG_TRANSFORM_SKEWY }; var name = "Item " + index + " of '" + spec + "'"; // Compare type - if (typeof spec.type != "undefined") { - ise(transform.type, typeMapping[spec.type], name + " - transform type"); + if (typeof expected.type != "undefined") { + ise(transform.type, typeMapping[expected.type], name + " - transform type"); } // Compare angle - if (typeof spec.angle != "undefined") { - ise(transform.angle, spec.angle, name + " - angle"); + if (typeof expected.angle != "undefined") { + ise(transform.angle, expected.angle, name + " - angle"); } // Compare matrix values (roughly) From d64b1c97c0d167d18642b133c5376fab6db642f2 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Thu, 5 Dec 2013 20:33:49 -0800 Subject: [PATCH 04/25] Bug 942152, r=dkeeler, r=honzab --HG-- extra : rebase_source : 7f0bab4efa26e9c185b29fdb14d846035147fd2f --- security/manager/ssl/src/nsNSSIOLayer.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/security/manager/ssl/src/nsNSSIOLayer.cpp b/security/manager/ssl/src/nsNSSIOLayer.cpp index cbf6d67179f..1071d35e506 100644 --- a/security/manager/ssl/src/nsNSSIOLayer.cpp +++ b/security/manager/ssl/src/nsNSSIOLayer.cpp @@ -1036,7 +1036,8 @@ int32_t checkHandshake(int32_t bytesTransfered, bool wasReading, PRFileDesc* ssl_layer_fd, nsNSSSocketInfo *socketInfo) { - PRErrorCode err = PR_GetError(); + const PRErrorCode originalError = PR_GetError(); + PRErrorCode err = originalError; // This is where we work around all of those SSL servers that don't // conform to the SSL spec and shutdown a connection when we request @@ -1114,6 +1115,14 @@ int32_t checkHandshake(int32_t bytesTransfered, bool wasReading, } if (bytesTransfered < 0) { + // Remember that we encountered an error so that getSocketInfoIfRunning + // will correctly cause us to fail if another part of Gecko + // (erroneously) calls an I/O function (PR_Send/PR_Recv/etc.) again on + // this socket. Note that we use the original error because if we use + // PR_CONNECT_RESET_ERROR, we'll repeated try to reconnect. + if (originalError != PR_WOULD_BLOCK_ERROR && !socketInfo->GetErrorCode()) { + socketInfo->SetCanceled(originalError, PlainErrorMessage); + } PR_SetError(err, 0); } From d9c1235f0ad4dab9b4f262792ac1a1e25b666a6b Mon Sep 17 00:00:00 2001 From: Brian Hackett Date: Sun, 8 Dec 2013 16:44:54 -0800 Subject: [PATCH 05/25] Bug 947661 - Fix offset test used to find the block chain for a pc. --- js/src/jsopcode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/jsopcode.cpp b/js/src/jsopcode.cpp index d7d64ded74a..14c6432f859 100644 --- a/js/src/jsopcode.cpp +++ b/js/src/jsopcode.cpp @@ -1464,7 +1464,7 @@ js::GetBlockChainAtPC(JSScript *script, jsbytecode *pc) while (check >= bottom) { const BlockScopeNote *checkNote = &blockScopes->vector[check]; JS_ASSERT(checkNote->start <= offset); - if (offset <= checkNote->start + checkNote->length) { + if (offset < checkNote->start + checkNote->length) { // We found a matching block chain but there may be inner ones // at a higher block chain index than mid. Continue the binary search. blockChain = &script->getObject(checkNote->index)->as(); From 31581c859c31de42f5a0b336151c62d7576ef58f Mon Sep 17 00:00:00 2001 From: Nicholas Cameron Date: Mon, 9 Dec 2013 14:40:58 +1300 Subject: [PATCH 06/25] Bug 865033 part 1. Remove GetLayerManager from CompositorParent. r=mattwoodrow --- .../ipc/CompositorCocoaWidgetHelper.cpp | 24 --------------- gfx/layers/ipc/CompositorCocoaWidgetHelper.h | 29 ------------------- gfx/layers/ipc/CompositorParent.cpp | 10 +++++-- gfx/layers/ipc/CompositorParent.h | 3 +- gfx/layers/moz.build | 2 -- widget/cocoa/nsChildView.mm | 1 - 6 files changed, 8 insertions(+), 61 deletions(-) delete mode 100644 gfx/layers/ipc/CompositorCocoaWidgetHelper.cpp delete mode 100644 gfx/layers/ipc/CompositorCocoaWidgetHelper.h diff --git a/gfx/layers/ipc/CompositorCocoaWidgetHelper.cpp b/gfx/layers/ipc/CompositorCocoaWidgetHelper.cpp deleted file mode 100644 index 40d7d522093..00000000000 --- a/gfx/layers/ipc/CompositorCocoaWidgetHelper.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set sw=2 ts=2 et tw=80 : */ -/* 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/. */ - -#include "CompositorParent.h" -#include "CompositorCocoaWidgetHelper.h" -#include "nsDebug.h" - -namespace mozilla { -namespace layers { -namespace compositor { - -LayerManagerComposite* -GetLayerManager(CompositorParent* aParent) -{ - return aParent->GetLayerManager(); -} - - -} -} -} diff --git a/gfx/layers/ipc/CompositorCocoaWidgetHelper.h b/gfx/layers/ipc/CompositorCocoaWidgetHelper.h deleted file mode 100644 index 5da00f76789..00000000000 --- a/gfx/layers/ipc/CompositorCocoaWidgetHelper.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* vim: set sw=4 ts=8 et tw=80 : */ -/* 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_layers_CompositorCocoaWidgetHelper_h -#define mozilla_layers_CompositorCocoaWidgetHelper_h - -// Note we can't include IPDL-generated headers here, since this file is being -// used as a workaround for Bug 719036. - -namespace mozilla { -namespace layers { - -class CompositorParent; -class LayerManagerComposite; - -namespace compositor { - -// Needed when we cannot directly include CompositorParent.h since it includes -// an IPDL-generated header (e.g. in widget/cocoa/nsChildView.mm; see Bug 719036). -LayerManagerComposite* GetLayerManager(CompositorParent* aParent); - -} -} -} -#endif // mozilla_layers_CompositorCocoaWidgetHelper_h - diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index 8ca9f571fe6..2359bfc5d1d 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -62,6 +62,7 @@ namespace layers { CompositorParent::LayerTreeState::LayerTreeState() : mParent(nullptr) + , mLayerManager(nullptr) { } @@ -263,6 +264,7 @@ CompositorParent::RecvWillStop() LayerTreeState* lts = &it->second; if (lts->mParent == this) { mLayerManager->ClearCachedResources(lts->mRoot); + lts->mLayerManager = nullptr; } } mLayerManager->Destroy(); @@ -371,6 +373,7 @@ CompositorParent::ActorDestroy(ActorDestroyReason why) if (mLayerManager) { mLayerManager->Destroy(); mLayerManager = nullptr; + sIndirectLayerTrees[mRootLayerTreeID].mLayerManager = nullptr; mCompositionManager = nullptr; } } @@ -503,7 +506,7 @@ CompositorParent::NotifyShadowTreeTransaction(uint64_t aId, bool aIsFirstPaint) AutoResolveRefLayers resolve(mCompositionManager); mApzcTreeManager->UpdatePanZoomControllerTree(this, mLayerManager->GetRoot(), aIsFirstPaint, aId); - mLayerManager->AsLayerManagerComposite()->NotifyShadowTreeTransaction(); + mLayerManager->NotifyShadowTreeTransaction(); } ScheduleComposition(); } @@ -734,6 +737,7 @@ CompositorParent::InitializeLayerManager(const nsTArray& aBackend if (layerManager->Initialize()) { mLayerManager = layerManager; + sIndirectLayerTrees[mRootLayerTreeID].mLayerManager = layerManager; return; } } @@ -1071,8 +1075,8 @@ CrossProcessCompositorParent::AllocPLayerTransactionParent(const nsTArrayGetLayerManager(); + if (sIndirectLayerTrees[aId].mLayerManager) { + LayerManagerComposite* lm = sIndirectLayerTrees[aId].mLayerManager; *aTextureFactoryIdentifier = lm->GetTextureFactoryIdentifier(); *aSuccess = true; LayerTransactionParent* p = new LayerTransactionParent(lm, this, aId); diff --git a/gfx/layers/ipc/CompositorParent.h b/gfx/layers/ipc/CompositorParent.h index c8f2c46d068..9beb697b4cb 100644 --- a/gfx/layers/ipc/CompositorParent.h +++ b/gfx/layers/ipc/CompositorParent.h @@ -107,8 +107,6 @@ public: void ForceIsFirstPaint(); void Destroy(); - LayerManagerComposite* GetLayerManager() { return mLayerManager; } - void NotifyChildCreated(uint64_t aChild); void AsyncRender(); @@ -203,6 +201,7 @@ public: nsRefPtr mRoot; nsRefPtr mController; CompositorParent* mParent; + LayerManagerComposite* mLayerManager; TargetConfig mTargetConfig; }; diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build index 6b5d77857bf..9af45accae0 100644 --- a/gfx/layers/moz.build +++ b/gfx/layers/moz.build @@ -128,7 +128,6 @@ EXPORTS.mozilla.layers += [ 'ipc/CompositableForwarder.h', 'ipc/CompositableTransactionParent.h', 'ipc/CompositorChild.h', - 'ipc/CompositorCocoaWidgetHelper.h', 'ipc/CompositorParent.h', 'ipc/GeckoContentController.h', 'ipc/GestureEventListener.h', @@ -240,7 +239,6 @@ UNIFIED_SOURCES += [ 'ipc/Axis.cpp', 'ipc/CompositableTransactionParent.cpp', 'ipc/CompositorChild.cpp', - 'ipc/CompositorCocoaWidgetHelper.cpp', 'ipc/CompositorParent.cpp', 'ipc/GestureEventListener.cpp', 'ipc/ImageBridgeChild.cpp', diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index 7949b6ce008..1df510acb3f 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -63,7 +63,6 @@ #include "GLContext.h" #include "GLUploadHelpers.h" #include "mozilla/layers/GLManager.h" -#include "mozilla/layers/CompositorCocoaWidgetHelper.h" #include "mozilla/layers/CompositorOGL.h" #include "mozilla/layers/BasicCompositor.h" #include "gfxUtils.h" From bd97008ccc8da180ca86ceb0d5cf759a61cdfdc3 Mon Sep 17 00:00:00 2001 From: Nicholas Cameron Date: Mon, 9 Dec 2013 14:40:58 +1300 Subject: [PATCH 07/25] Bug 865033 part 2. Add mCompositor to CompositorParent. r=mattwoodrow --- gfx/layers/ipc/CompositorParent.cpp | 38 ++++++++++++++--------------- gfx/layers/ipc/CompositorParent.h | 2 ++ 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index 2359bfc5d1d..a5cddbbc743 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -238,6 +238,7 @@ CompositorParent::Destroy() // Ensure that the layer manager is destructed on the compositor thread. mLayerManager = nullptr; + mCompositor = nullptr; mCompositionManager = nullptr; mApzcTreeManager->ClearTree(); mApzcTreeManager = nullptr; @@ -269,6 +270,7 @@ CompositorParent::RecvWillStop() } mLayerManager->Destroy(); mLayerManager = nullptr; + mCompositor = nullptr; mCompositionManager = nullptr; } @@ -375,6 +377,7 @@ CompositorParent::ActorDestroy(ActorDestroyReason why) mLayerManager = nullptr; sIndirectLayerTrees[mRootLayerTreeID].mLayerManager = nullptr; mCompositionManager = nullptr; + mCompositor = nullptr; } } @@ -397,7 +400,7 @@ CompositorParent::PauseComposition() if (!mPaused) { mPaused = true; - mLayerManager->GetCompositor()->Pause(); + mCompositor->Pause(); } // if anyone's waiting to make sure that composition really got paused, tell them @@ -412,7 +415,7 @@ CompositorParent::ResumeComposition() MonitorAutoLock lock(mResumeCompositionMonitor); - if (!mLayerManager->GetCompositor()->Resume()) { + if (!mCompositor->Resume()) { #ifdef MOZ_WIDGET_ANDROID // We can't get a surface. This could be because the activity changed between // the time resume was scheduled and now. @@ -443,8 +446,8 @@ CompositorParent::SetEGLSurfaceSize(int width, int height) { NS_ASSERTION(mUseExternalSurfaceSize, "Compositor created without UseExternalSurfaceSize provided"); mEGLSurfaceSize.SizeTo(width, height); - if (mLayerManager) { - mLayerManager->GetCompositor()->SetDestinationSurfaceSize(gfx::IntSize(mEGLSurfaceSize.width, mEGLSurfaceSize.height)); + if (mCompositor) { + mCompositor->SetDestinationSurfaceSize(gfx::IntSize(mEGLSurfaceSize.width, mEGLSurfaceSize.height)); } } @@ -709,34 +712,31 @@ CompositorParent::InitializeLayerManager(const nsTArray& aBackend NS_ASSERTION(!mLayerManager, "Already initialised mLayerManager"); for (size_t i = 0; i < aBackendHints.Length(); ++i) { - RefPtr layerManager; + RefPtr compositor; if (aBackendHints[i] == LAYERS_OPENGL) { - layerManager = - new LayerManagerComposite(new CompositorOGL(mWidget, - mEGLSurfaceSize.width, - mEGLSurfaceSize.height, - mUseExternalSurfaceSize)); + compositor = new CompositorOGL(mWidget, + mEGLSurfaceSize.width, + mEGLSurfaceSize.height, + mUseExternalSurfaceSize); } else if (aBackendHints[i] == LAYERS_BASIC) { - layerManager = - new LayerManagerComposite(new BasicCompositor(mWidget)); + compositor = new BasicCompositor(mWidget); #ifdef XP_WIN } else if (aBackendHints[i] == LAYERS_D3D11) { - layerManager = - new LayerManagerComposite(new CompositorD3D11(mWidget)); + compositor = new CompositorD3D11(mWidget); } else if (aBackendHints[i] == LAYERS_D3D9) { - layerManager = - new LayerManagerComposite(new CompositorD3D9(this, mWidget)); + compositor = new CompositorD3D9(this, mWidget); #endif } - if (!layerManager) { - continue; - } + MOZ_ASSERT(compositor, "Passed invalid backend hint"); + RefPtr layerManager = new LayerManagerComposite(compositor); layerManager->SetCompositorID(mCompositorID); if (layerManager->Initialize()) { mLayerManager = layerManager; + MOZ_ASSERT(compositor); + mCompositor = compositor; sIndirectLayerTrees[mRootLayerTreeID].mLayerManager = layerManager; return; } diff --git a/gfx/layers/ipc/CompositorParent.h b/gfx/layers/ipc/CompositorParent.h index 9beb697b4cb..2a92b1eb722 100644 --- a/gfx/layers/ipc/CompositorParent.h +++ b/gfx/layers/ipc/CompositorParent.h @@ -47,6 +47,7 @@ namespace layers { class APZCTreeManager; class AsyncCompositionManager; +class Compositor; class LayerManagerComposite; class LayerTransactionParent; @@ -294,6 +295,7 @@ private: bool CanComposite(); nsRefPtr mLayerManager; + nsRefPtr mCompositor; RefPtr mCompositionManager; nsIWidget* mWidget; CancelableTask *mCurrentCompositeTask; From feeffb08cf3419e98a0ec7c9f1c7d1686fff0ac6 Mon Sep 17 00:00:00 2001 From: Nicholas Cameron Date: Mon, 9 Dec 2013 14:40:59 +1300 Subject: [PATCH 08/25] Bug 946958 part 1. Remove GetWidgetSize. r=mattwoodrow --- gfx/layers/Compositor.h | 1 - gfx/layers/basic/BasicCompositor.cpp | 2 -- gfx/layers/basic/BasicCompositor.h | 4 ---- gfx/layers/composite/LayerManagerComposite.cpp | 6 ------ gfx/layers/composite/LayerManagerComposite.h | 2 -- gfx/layers/d3d11/CompositorD3D11.h | 8 -------- gfx/layers/d3d9/CompositorD3D9.h | 8 -------- gfx/layers/opengl/CompositorOGL.h | 3 --- 8 files changed, 34 deletions(-) diff --git a/gfx/layers/Compositor.h b/gfx/layers/Compositor.h index 9ed589d387d..cf7023be972 100644 --- a/gfx/layers/Compositor.h +++ b/gfx/layers/Compositor.h @@ -431,7 +431,6 @@ public: // XXX I expect we will want to move mWidget into this class and implement // these methods properly. virtual nsIWidget* GetWidget() const { return nullptr; } - virtual const nsIntSize& GetWidgetSize() = 0; // Call before and after any rendering not done by this compositor but which // might affect the compositor's internal state or the state of any APIs it diff --git a/gfx/layers/basic/BasicCompositor.cpp b/gfx/layers/basic/BasicCompositor.cpp index 97e8b485f08..cc934831b3b 100644 --- a/gfx/layers/basic/BasicCompositor.cpp +++ b/gfx/layers/basic/BasicCompositor.cpp @@ -220,7 +220,6 @@ CreateBasicDeprecatedTextureHost(SurfaceDescriptorType aDescriptorType, BasicCompositor::BasicCompositor(nsIWidget *aWidget) : mWidget(aWidget) - , mWidgetSize(-1, -1) { MOZ_COUNT_CTOR(BasicCompositor); sBackend = LAYERS_BASIC; @@ -540,7 +539,6 @@ BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion, nsIntRect intRect; mWidget->GetClientBounds(intRect); Rect rect = Rect(0, 0, intRect.width, intRect.height); - mWidgetSize = intRect.Size(); nsIntRect invalidRect = aInvalidRegion.GetBounds(); mInvalidRect = IntRect(invalidRect.x, invalidRect.y, invalidRect.width, invalidRect.height); diff --git a/gfx/layers/basic/BasicCompositor.h b/gfx/layers/basic/BasicCompositor.h index ac969937cef..e4500e6c0d4 100644 --- a/gfx/layers/basic/BasicCompositor.h +++ b/gfx/layers/basic/BasicCompositor.h @@ -119,10 +119,6 @@ public: virtual const char* Name() const { return "Basic"; } virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; } - virtual const nsIntSize& GetWidgetSize() MOZ_OVERRIDE - { - return mWidgetSize; - } gfx::DrawTarget *GetDrawTarget() { return mDrawTarget; } diff --git a/gfx/layers/composite/LayerManagerComposite.cpp b/gfx/layers/composite/LayerManagerComposite.cpp index ea3a6b0e3c7..94d8d654bea 100644 --- a/gfx/layers/composite/LayerManagerComposite.cpp +++ b/gfx/layers/composite/LayerManagerComposite.cpp @@ -786,12 +786,6 @@ LayerComposite::Destroy() } } -const nsIntSize& -LayerManagerComposite::GetWidgetSize() -{ - return mCompositor->GetWidgetSize(); -} - void LayerManagerComposite::SetCompositorID(uint32_t aID) { diff --git a/gfx/layers/composite/LayerManagerComposite.h b/gfx/layers/composite/LayerManagerComposite.h index d0097abaf4f..1dde8755d8f 100644 --- a/gfx/layers/composite/LayerManagerComposite.h +++ b/gfx/layers/composite/LayerManagerComposite.h @@ -198,8 +198,6 @@ public: CreateDrawTarget(const mozilla::gfx::IntSize &aSize, mozilla::gfx::SurfaceFormat aFormat) MOZ_OVERRIDE; - const nsIntSize& GetWidgetSize(); - /** * Calculates the 'completeness' of the rendering that intersected with the * screen on the last render. This is only useful when progressive tile diff --git a/gfx/layers/d3d11/CompositorD3D11.h b/gfx/layers/d3d11/CompositorD3D11.h index acd767c5d59..66441978865 100644 --- a/gfx/layers/d3d11/CompositorD3D11.h +++ b/gfx/layers/d3d11/CompositorD3D11.h @@ -139,14 +139,6 @@ public: virtual void NotifyLayersTransaction() MOZ_OVERRIDE { } virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; } - virtual const nsIntSize& GetWidgetSize() MOZ_OVERRIDE - { - NS_ASSERTION(false, "Getting the widget size on windows causes some kind of resizing of buffers. " - "You should not do that outside of BeginFrame, so the best we can do is return " - "the last size we got, that might not be up to date. So you probably shouldn't " - "use this method."); - return mSize; - } ID3D11Device* GetDevice() { return mDevice; } diff --git a/gfx/layers/d3d9/CompositorD3D9.h b/gfx/layers/d3d9/CompositorD3D9.h index ca8d3542e47..7b96fa561a3 100644 --- a/gfx/layers/d3d9/CompositorD3D9.h +++ b/gfx/layers/d3d9/CompositorD3D9.h @@ -86,14 +86,6 @@ public: virtual void NotifyLayersTransaction() MOZ_OVERRIDE {} virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; } - virtual const nsIntSize& GetWidgetSize() MOZ_OVERRIDE - { - NS_ASSERTION(false, "Getting the widget size on windows causes some kind of resizing of buffers. " - "You should not do that outside of BeginFrame, so the best we can do is return " - "the last size we got, that might not be up to date. So you probably shouldn't " - "use this method."); - return mSize; - } IDirect3DDevice9* device() const { diff --git a/gfx/layers/opengl/CompositorOGL.h b/gfx/layers/opengl/CompositorOGL.h index 72a3db542fd..e6427a593fb 100644 --- a/gfx/layers/opengl/CompositorOGL.h +++ b/gfx/layers/opengl/CompositorOGL.h @@ -158,9 +158,6 @@ public: virtual bool Resume() MOZ_OVERRIDE; virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; } - virtual const nsIntSize& GetWidgetSize() MOZ_OVERRIDE { - return mWidgetSize; - } GLContext* gl() const { return mGLContext; } ShaderProgramType GetFBOLayerProgramType() const { From d8b85a8d7fffb6484d72fb77650e52ea8c42fc57 Mon Sep 17 00:00:00 2001 From: Nicholas Cameron Date: Mon, 9 Dec 2013 14:40:59 +1300 Subject: [PATCH 09/25] Bug 946958 part 2. Remove methods which just forward to compositor. r=mattwoodrow --- gfx/layers/Layers.cpp | 9 ------- gfx/layers/Layers.h | 6 ----- gfx/layers/client/ClientLayerManager.h | 2 +- .../composite/LayerManagerComposite.cpp | 25 ------------------- gfx/layers/composite/LayerManagerComposite.h | 16 ++++++------ gfx/layers/ipc/CompositorParent.cpp | 10 ++++---- layout/ipc/RenderFrameParent.cpp | 3 ++- 7 files changed, 15 insertions(+), 56 deletions(-) diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp index 53fa38457d5..14ab891c6b3 100644 --- a/gfx/layers/Layers.cpp +++ b/gfx/layers/Layers.cpp @@ -133,15 +133,6 @@ LayerManager::CreateDrawTarget(const IntSize &aSize, CreateOffscreenCanvasDrawTarget(aSize, aFormat); } -TextureFactoryIdentifier -LayerManager::GetTextureFactoryIdentifier() -{ - //TODO[nrc] make pure virtual when all layer managers use Compositor - NS_ERROR("Should have been overridden"); - return TextureFactoryIdentifier(); -} - - #ifdef DEBUG void LayerManager::Mutated(Layer* aLayer) diff --git a/gfx/layers/Layers.h b/gfx/layers/Layers.h index 5495036de96..3776120436b 100644 --- a/gfx/layers/Layers.h +++ b/gfx/layers/Layers.h @@ -437,12 +437,6 @@ public: virtual bool CanUseCanvasLayerForSize(const gfxIntSize &aSize) { return true; } - /** - * Returns a TextureFactoryIdentifier which describes properties of the backend - * used to decide what kind of texture and buffer clients to create - */ - virtual TextureFactoryIdentifier GetTextureFactoryIdentifier(); - /** * returns the maximum texture size on this layer backend, or INT32_MAX * if there is no maximum diff --git a/gfx/layers/client/ClientLayerManager.h b/gfx/layers/client/ClientLayerManager.h index 0955238ead5..ddff4448933 100644 --- a/gfx/layers/client/ClientLayerManager.h +++ b/gfx/layers/client/ClientLayerManager.h @@ -73,7 +73,7 @@ public: virtual already_AddRefed CreateColorLayer(); virtual already_AddRefed CreateRefLayer(); - virtual TextureFactoryIdentifier GetTextureFactoryIdentifier() MOZ_OVERRIDE + TextureFactoryIdentifier GetTextureFactoryIdentifier() { return mForwarder->GetTextureFactoryIdentifier(); } diff --git a/gfx/layers/composite/LayerManagerComposite.cpp b/gfx/layers/composite/LayerManagerComposite.cpp index 94d8d654bea..ed03052b1f8 100644 --- a/gfx/layers/composite/LayerManagerComposite.cpp +++ b/gfx/layers/composite/LayerManagerComposite.cpp @@ -786,19 +786,6 @@ LayerComposite::Destroy() } } -void -LayerManagerComposite::SetCompositorID(uint32_t aID) -{ - NS_ASSERTION(mCompositor, "No compositor"); - mCompositor->SetCompositorID(aID); -} - -void -LayerManagerComposite::NotifyShadowTreeTransaction() -{ - mCompositor->NotifyLayersTransaction(); -} - bool LayerManagerComposite::CanUseCanvasLayerForSize(const gfxIntSize &aSize) { @@ -806,18 +793,6 @@ LayerManagerComposite::CanUseCanvasLayerForSize(const gfxIntSize &aSize) aSize.height)); } -TextureFactoryIdentifier -LayerManagerComposite::GetTextureFactoryIdentifier() -{ - return mCompositor->GetTextureFactoryIdentifier(); -} - -int32_t -LayerManagerComposite::GetMaxTextureSize() const -{ - return mCompositor->GetMaxTextureSize(); -} - #ifndef MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS /*static*/ bool diff --git a/gfx/layers/composite/LayerManagerComposite.h b/gfx/layers/composite/LayerManagerComposite.h index 1dde8755d8f..c9c6226b818 100644 --- a/gfx/layers/composite/LayerManagerComposite.h +++ b/gfx/layers/composite/LayerManagerComposite.h @@ -110,8 +110,6 @@ public: } void BeginTransactionWithDrawTarget(gfx::DrawTarget* aTarget); - void NotifyShadowTreeTransaction(); - virtual bool EndEmptyTransaction(EndTransactionFlags aFlags = END_DEFAULT) MOZ_OVERRIDE; virtual void EndTransaction(DrawThebesLayerCallback aCallback, void* aCallbackData, @@ -119,11 +117,14 @@ public: virtual void SetRoot(Layer* aLayer) MOZ_OVERRIDE { mRoot = aLayer; } + // XXX[nrc]: never called, we should move this logic to ClientLayerManager + // (bug 946926). virtual bool CanUseCanvasLayerForSize(const gfxIntSize &aSize) MOZ_OVERRIDE; - virtual TextureFactoryIdentifier GetTextureFactoryIdentifier() MOZ_OVERRIDE; - - virtual int32_t GetMaxTextureSize() const MOZ_OVERRIDE; + virtual int32_t GetMaxTextureSize() const MOZ_OVERRIDE + { + MOZ_CRASH("Call on compositor, not LayerManagerComposite"); + } virtual void ClearCachedResources(Layer* aSubtree = nullptr) MOZ_OVERRIDE; @@ -145,8 +146,7 @@ public: } virtual void GetBackendName(nsAString& name) MOZ_OVERRIDE { - MOZ_ASSERT(false, "Shouldn't be called for composited layer manager"); - name.AssignLiteral("Composite"); + MOZ_CRASH("Shouldn't be called for composited layer manager"); } virtual already_AddRefed @@ -215,8 +215,6 @@ public: static void PlatformSyncBeforeReplyUpdate(); - void SetCompositorID(uint32_t aID); - void AddInvalidRegion(const nsIntRegion& aRegion) { mInvalidRegion.Or(mInvalidRegion, aRegion); diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index a5cddbbc743..b864fbb0429 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -509,7 +509,7 @@ CompositorParent::NotifyShadowTreeTransaction(uint64_t aId, bool aIsFirstPaint) AutoResolveRefLayers resolve(mCompositionManager); mApzcTreeManager->UpdatePanZoomControllerTree(this, mLayerManager->GetRoot(), aIsFirstPaint, aId); - mLayerManager->NotifyShadowTreeTransaction(); + mCompositor->NotifyLayersTransaction(); } ScheduleComposition(); } @@ -703,7 +703,7 @@ CompositorParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree, } } ScheduleComposition(); - mLayerManager->NotifyShadowTreeTransaction(); + mCompositor->NotifyLayersTransaction(); } void @@ -730,8 +730,8 @@ CompositorParent::InitializeLayerManager(const nsTArray& aBackend MOZ_ASSERT(compositor, "Passed invalid backend hint"); + compositor->SetCompositorID(mCompositorID); RefPtr layerManager = new LayerManagerComposite(compositor); - layerManager->SetCompositorID(mCompositorID); if (layerManager->Initialize()) { mLayerManager = layerManager; @@ -769,7 +769,7 @@ CompositorParent::AllocPLayerTransactionParent(const nsTArray& aB mCompositionManager = new AsyncCompositionManager(mLayerManager); *aSuccess = true; - *aTextureFactoryIdentifier = mLayerManager->GetTextureFactoryIdentifier(); + *aTextureFactoryIdentifier = mCompositor->GetTextureFactoryIdentifier(); LayerTransactionParent* p = new LayerTransactionParent(mLayerManager, this, 0); p->AddIPDLReference(); return p; @@ -1077,7 +1077,7 @@ CrossProcessCompositorParent::AllocPLayerTransactionParent(const nsTArrayGetTextureFactoryIdentifier(); + *aTextureFactoryIdentifier = lm->GetCompositor()->GetTextureFactoryIdentifier(); *aSuccess = true; LayerTransactionParent* p = new LayerTransactionParent(lm, this, aId); p->AddIPDLReference(); diff --git a/layout/ipc/RenderFrameParent.cpp b/layout/ipc/RenderFrameParent.cpp index c65ff48db0a..820bb239be5 100644 --- a/layout/ipc/RenderFrameParent.cpp +++ b/layout/ipc/RenderFrameParent.cpp @@ -647,7 +647,8 @@ RenderFrameParent::RenderFrameParent(nsFrameLoader* aFrameLoader, nsRefPtr lm = GetFrom(mFrameLoader); // Perhaps the document containing this frame currently has no presentation? if (lm && lm->GetBackendType() == LAYERS_CLIENT) { - *aTextureFactoryIdentifier = lm->GetTextureFactoryIdentifier(); + *aTextureFactoryIdentifier = + static_cast(lm.get())->GetTextureFactoryIdentifier(); } else { *aTextureFactoryIdentifier = TextureFactoryIdentifier(); } From 89b799064048ac577d88898ca882841f201a671e Mon Sep 17 00:00:00 2001 From: Nicholas Cameron Date: Mon, 9 Dec 2013 14:40:59 +1300 Subject: [PATCH 10/25] Bug 946958 part 3. Remove thebes callbacks. r=mattwoodrow --- gfx/layers/composite/LayerManagerComposite.cpp | 7 +------ gfx/layers/composite/LayerManagerComposite.h | 10 ---------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/gfx/layers/composite/LayerManagerComposite.cpp b/gfx/layers/composite/LayerManagerComposite.cpp index ed03052b1f8..f531f7905c4 100644 --- a/gfx/layers/composite/LayerManagerComposite.cpp +++ b/gfx/layers/composite/LayerManagerComposite.cpp @@ -203,6 +203,7 @@ LayerManagerComposite::EndTransaction(DrawThebesLayerCallback aCallback, EndTransactionFlags aFlags) { NS_ASSERTION(mInTransaction, "Didn't call BeginTransaction?"); + NS_ASSERTION(!aCallback && !aCallbackData, "Not expecting callbacks here"); mInTransaction = false; if (!mIsCompositorReady) { @@ -240,13 +241,7 @@ LayerManagerComposite::EndTransaction(DrawThebesLayerCallback aCallback, // so we don't need to pass any global transform here. mRoot->ComputeEffectiveTransforms(gfx3DMatrix()); - mThebesLayerCallback = aCallback; - mThebesLayerCallbackData = aCallbackData; - Render(); - - mThebesLayerCallback = nullptr; - mThebesLayerCallbackData = nullptr; } mCompositor->SetTargetContext(nullptr); diff --git a/gfx/layers/composite/LayerManagerComposite.h b/gfx/layers/composite/LayerManagerComposite.h index c9c6226b818..5bf369302cd 100644 --- a/gfx/layers/composite/LayerManagerComposite.h +++ b/gfx/layers/composite/LayerManagerComposite.h @@ -153,12 +153,6 @@ public: CreateOptimalMaskSurface(const gfxIntSize &aSize) MOZ_OVERRIDE; - DrawThebesLayerCallback GetThebesLayerCallback() const - { return mThebesLayerCallback; } - - void* GetThebesLayerCallbackData() const - { return mThebesLayerCallbackData; } - virtual const char* Name() const MOZ_OVERRIDE { return ""; } enum WorldTransforPolicy { @@ -271,10 +265,6 @@ private: /** Our more efficient but less powerful alter ego, if one is available. */ nsRefPtr mComposer2D; - /* Thebes layer callbacks; valid at the end of a transaciton, - * while rendering */ - DrawThebesLayerCallback mThebesLayerCallback; - void *mThebesLayerCallbackData; gfxMatrix mWorldMatrix; bool mInTransaction; From ebb90c9836f1be0314fc1de598fa006ca5e4786a Mon Sep 17 00:00:00 2001 From: Nicholas Cameron Date: Mon, 9 Dec 2013 14:40:59 +1300 Subject: [PATCH 11/25] Bug 946958 part 4. Tidy up interaction with widgets. r=kats --- gfx/layers/ipc/CompositorParent.cpp | 11 +++++++++++ gfx/layers/ipc/CompositorParent.h | 2 ++ gfx/layers/opengl/GLManager.cpp | 21 ++++++--------------- gfx/layers/opengl/GLManager.h | 4 ++-- widget/android/nsWindow.cpp | 10 +++------- widget/android/nsWindow.h | 4 ++-- widget/cocoa/nsChildView.h | 6 +++--- widget/cocoa/nsChildView.mm | 6 +++--- widget/nsIWidget.h | 24 ++++++++++++------------ widget/xpwidgets/nsBaseWidget.h | 8 ++++---- 10 files changed, 48 insertions(+), 48 deletions(-) diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index b864fbb0429..972813961c2 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -925,6 +925,17 @@ CompositorParent::GetAPZCTreeManager(uint64_t aLayersId) return nullptr; } +float +CompositorParent::ComputeRenderIntegrity() +{ + if (mLayerManager) { + return mLayerManager->ComputeRenderIntegrity(); + } + + return 1.0f; +} + + /** * This class handles layer updates pushed directly from child * processes to the compositor thread. It's associated with a diff --git a/gfx/layers/ipc/CompositorParent.h b/gfx/layers/ipc/CompositorParent.h index 2a92b1eb722..cfe5a425738 100644 --- a/gfx/layers/ipc/CompositorParent.h +++ b/gfx/layers/ipc/CompositorParent.h @@ -213,6 +213,8 @@ public: */ static const LayerTreeState* GetIndirectShadowTree(uint64_t aId); + float ComputeRenderIntegrity(); + /** * Tell all CompositorParents to update their last refresh to aTime and sample * animations at this time stamp. If aIsTesting is true, the diff --git a/gfx/layers/opengl/GLManager.cpp b/gfx/layers/opengl/GLManager.cpp index f6a610c6eb4..6aaa1eb9916 100644 --- a/gfx/layers/opengl/GLManager.cpp +++ b/gfx/layers/opengl/GLManager.cpp @@ -6,7 +6,6 @@ #include "GLManager.h" #include "CompositorOGL.h" // for CompositorOGL #include "GLContext.h" // for GLContext -#include "Layers.h" // for LayerManager #include "mozilla/Assertions.h" // for MOZ_CRASH #include "mozilla/Attributes.h" // for MOZ_OVERRIDE #include "mozilla/RefPtr.h" // for RefPtr @@ -15,7 +14,6 @@ #include "mozilla/layers/LayersTypes.h" #include "mozilla/mozalloc.h" // for operator new, etc #include "nsAutoPtr.h" // for nsRefPtr -#include "nsISupportsImpl.h" // for LayerManager::AddRef, etc using namespace mozilla::gl; @@ -49,21 +47,14 @@ private: }; /* static */ GLManager* -GLManager::CreateGLManager(LayerManager* aManager) +GLManager::CreateGLManager(LayerManagerComposite* aManager) { - if (!aManager) { - return nullptr; + if (aManager && + Compositor::GetBackend() == LAYERS_OPENGL) { + return new GLManagerCompositor(static_cast( + aManager->GetCompositor())); } - if (aManager->GetBackendType() == LAYERS_NONE) { - if (Compositor::GetBackend() == LAYERS_OPENGL) { - return new GLManagerCompositor(static_cast( - static_cast(aManager)->GetCompositor())); - } else { - return nullptr; - } - } - - MOZ_CRASH("Cannot create GLManager for non-GL layer manager"); + return nullptr; } } diff --git a/gfx/layers/opengl/GLManager.h b/gfx/layers/opengl/GLManager.h index 32c84484bc5..8319122a17b 100644 --- a/gfx/layers/opengl/GLManager.h +++ b/gfx/layers/opengl/GLManager.h @@ -16,7 +16,7 @@ class GLContext; namespace layers { -class LayerManager; +class LayerManagerComposite; /** * Minimal interface to allow widgets to draw using OpenGL. Abstracts @@ -26,7 +26,7 @@ class LayerManager; class GLManager { public: - static GLManager* CreateGLManager(LayerManager* aManager); + static GLManager* CreateGLManager(LayerManagerComposite* aManager); virtual ~GLManager() {} diff --git a/widget/android/nsWindow.cpp b/widget/android/nsWindow.cpp index ae33928593f..5ff850c3814 100644 --- a/widget/android/nsWindow.cpp +++ b/widget/android/nsWindow.cpp @@ -2328,7 +2328,7 @@ nsWindow::GetIMEUpdatePreference() } void -nsWindow::DrawWindowUnderlay(LayerManager* aManager, nsIntRect aRect) +nsWindow::DrawWindowUnderlay(LayerManagerComposite* aManager, nsIntRect aRect) { JNIEnv *env = GetJNIForThread(); NS_ABORT_IF_FALSE(env, "No JNI environment at DrawWindowUnderlay()!"); @@ -2362,7 +2362,7 @@ nsWindow::DrawWindowUnderlay(LayerManager* aManager, nsIntRect aRect) } void -nsWindow::DrawWindowOverlay(LayerManager* aManager, nsIntRect aRect) +nsWindow::DrawWindowOverlay(LayerManagerComposite* aManager, nsIntRect aRect) { PROFILER_LABEL("nsWindow", "DrawWindowOverlay"); JNIEnv *env = GetJNIForThread(); @@ -2430,11 +2430,7 @@ float nsWindow::ComputeRenderIntegrity() { if (sCompositorParent) { - mozilla::layers::LayerManagerComposite* manager = - static_cast(sCompositorParent->GetLayerManager()); - if (manager) { - return manager->ComputeRenderIntegrity(); - } + return sCompositorParent->ComputeRenderIntegrity(); } return 1.f; diff --git a/widget/android/nsWindow.h b/widget/android/nsWindow.h index 1a84c79bf44..28ce60a3bff 100644 --- a/widget/android/nsWindow.h +++ b/widget/android/nsWindow.h @@ -153,8 +153,8 @@ public: NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent); virtual bool NeedsPaint(); - virtual void DrawWindowUnderlay(LayerManager* aManager, nsIntRect aRect); - virtual void DrawWindowOverlay(LayerManager* aManager, nsIntRect aRect); + virtual void DrawWindowUnderlay(LayerManagerComposite* aManager, nsIntRect aRect); + virtual void DrawWindowOverlay(LayerManagerComposite* aManager, nsIntRect aRect); virtual mozilla::layers::CompositorParent* NewCompositorParent(int aSurfaceWidth, int aSurfaceHeight) MOZ_OVERRIDE; diff --git a/widget/cocoa/nsChildView.h b/widget/cocoa/nsChildView.h index 3d19739a751..d3a355ed677 100644 --- a/widget/cocoa/nsChildView.h +++ b/widget/cocoa/nsChildView.h @@ -549,9 +549,9 @@ public: virtual gfxASurface* GetThebesSurface(); virtual void PrepareWindowEffects() MOZ_OVERRIDE; virtual void CleanupWindowEffects() MOZ_OVERRIDE; - virtual bool PreRender(LayerManager* aManager) MOZ_OVERRIDE; - virtual void PostRender(LayerManager* aManager) MOZ_OVERRIDE; - virtual void DrawWindowOverlay(LayerManager* aManager, nsIntRect aRect) MOZ_OVERRIDE; + virtual bool PreRender(LayerManagerComposite* aManager) MOZ_OVERRIDE; + virtual void PostRender(LayerManagerComposite* aManager) MOZ_OVERRIDE; + virtual void DrawWindowOverlay(LayerManagerComposite* aManager, nsIntRect aRect) MOZ_OVERRIDE; virtual void UpdateThemeGeometries(const nsTArray& aThemeGeometries); diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index 1df510acb3f..05958ee5660 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -2046,7 +2046,7 @@ nsChildView::CleanupWindowEffects() } bool -nsChildView::PreRender(LayerManager* aManager) +nsChildView::PreRender(LayerManagerComposite* aManager) { nsAutoPtr manager(GLManager::CreateGLManager(aManager)); if (!manager) { @@ -2068,7 +2068,7 @@ nsChildView::PreRender(LayerManager* aManager) } void -nsChildView::PostRender(LayerManager* aManager) +nsChildView::PostRender(LayerManagerComposite* aManager) { nsAutoPtr manager(GLManager::CreateGLManager(aManager)); if (!manager) { @@ -2080,7 +2080,7 @@ nsChildView::PostRender(LayerManager* aManager) } void -nsChildView::DrawWindowOverlay(LayerManager* aManager, nsIntRect aRect) +nsChildView::DrawWindowOverlay(LayerManagerComposite* aManager, nsIntRect aRect) { nsAutoPtr manager(GLManager::CreateGLManager(aManager)); if (manager) { diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h index 80050c3286e..498d5647e79 100644 --- a/widget/nsIWidget.h +++ b/widget/nsIWidget.h @@ -41,6 +41,7 @@ namespace layers { class Composer2D; class CompositorChild; class LayerManager; +class LayerManagerComposite; class PLayerTransactionChild; } namespace gfx { @@ -96,8 +97,8 @@ typedef void* nsNativeWidget; #endif #define NS_IWIDGET_IID \ -{ 0xa1f684e6, 0x2ae1, 0x4513, \ - { 0xb6, 0x89, 0xf4, 0xd4, 0xfe, 0x9d, 0x2c, 0xdb } } +{ 0x746cb189, 0x9793, 0x4e53, \ + { 0x89, 0x47, 0x78, 0x56, 0xb6, 0xcd, 0x9f, 0x71 } } /* * Window shadow styles @@ -464,6 +465,7 @@ class nsIWidget : public nsISupports { typedef mozilla::layers::Composer2D Composer2D; typedef mozilla::layers::CompositorChild CompositorChild; typedef mozilla::layers::LayerManager LayerManager; + typedef mozilla::layers::LayerManagerComposite LayerManagerComposite; typedef mozilla::layers::LayersBackend LayersBackend; typedef mozilla::layers::PLayerTransactionChild PLayerTransactionChild; typedef mozilla::widget::NotificationToIME NotificationToIME; @@ -1216,38 +1218,36 @@ class nsIWidget : public nsISupports { virtual void CleanupWindowEffects() = 0; /** - * Called before rendering using OpenGL. Returns false when the widget is + * Called before rendering using OMTC. Returns false when the widget is * not ready to be rendered (for example while the window is closed). * * Always called from the compositing thread, which may be the main-thread if * OMTC is not enabled. */ - virtual bool PreRender(LayerManager* aManager) = 0; + virtual bool PreRender(LayerManagerComposite* aManager) = 0; /** - * Called after rendering using OpenGL. Not called when rendering was + * Called after rendering using OMTC. Not called when rendering was * cancelled by a negative return value from PreRender. * * Always called from the compositing thread, which may be the main-thread if * OMTC is not enabled. */ - virtual void PostRender(LayerManager* aManager) = 0; + virtual void PostRender(LayerManagerComposite* aManager) = 0; /** * Called before the LayerManager draws the layer tree. * - * Always called from the compositing thread, which may be the main-thread if - * OMTC is not enabled. + * Always called from the compositing thread. */ - virtual void DrawWindowUnderlay(LayerManager* aManager, nsIntRect aRect) = 0; + virtual void DrawWindowUnderlay(LayerManagerComposite* aManager, nsIntRect aRect) = 0; /** * Called after the LayerManager draws the layer tree * - * Always called from the compositing thread, which may be the main-thread if - * OMTC is not enabled. + * Always called from the compositing thread. */ - virtual void DrawWindowOverlay(LayerManager* aManager, nsIntRect aRect) = 0; + virtual void DrawWindowOverlay(LayerManagerComposite* aManager, nsIntRect aRect) = 0; /** * Return a DrawTarget for the window which can be composited into. diff --git a/widget/xpwidgets/nsBaseWidget.h b/widget/xpwidgets/nsBaseWidget.h index 7e66bc3a073..283ecf67b79 100644 --- a/widget/xpwidgets/nsBaseWidget.h +++ b/widget/xpwidgets/nsBaseWidget.h @@ -136,10 +136,10 @@ public: virtual void CreateCompositor(int aWidth, int aHeight); virtual void PrepareWindowEffects() {} virtual void CleanupWindowEffects() {} - virtual bool PreRender(LayerManager* aManager) { return true; } - virtual void PostRender(LayerManager* aManager) {} - virtual void DrawWindowUnderlay(LayerManager* aManager, nsIntRect aRect) {} - virtual void DrawWindowOverlay(LayerManager* aManager, nsIntRect aRect) {} + virtual bool PreRender(LayerManagerComposite* aManager) { return true; } + virtual void PostRender(LayerManagerComposite* aManager) {} + virtual void DrawWindowUnderlay(LayerManagerComposite* aManager, nsIntRect aRect) {} + virtual void DrawWindowOverlay(LayerManagerComposite* aManager, nsIntRect aRect) {} virtual mozilla::TemporaryRef StartRemoteDrawing(); virtual void EndRemoteDrawing() { }; virtual void CleanupRemoteDrawing() { }; From db15917f8c5efaf4524388ca67fa231a09af6abe Mon Sep 17 00:00:00 2001 From: Nicholas Cameron Date: Mon, 9 Dec 2013 14:41:00 +1300 Subject: [PATCH 12/25] Bug 946958 part 5. Misc tidy ups. r=mattwoodrow --- gfx/layers/composite/LayerManagerComposite.cpp | 4 ++-- gfx/layers/composite/LayerManagerComposite.h | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gfx/layers/composite/LayerManagerComposite.cpp b/gfx/layers/composite/LayerManagerComposite.cpp index f531f7905c4..e16fbb2d6a2 100644 --- a/gfx/layers/composite/LayerManagerComposite.cpp +++ b/gfx/layers/composite/LayerManagerComposite.cpp @@ -302,7 +302,7 @@ LayerManagerComposite::RootLayer() const return nullptr; } - return static_cast(mRoot->ImplData()); + return ToLayerComposite(mRoot); } static uint16_t sFrameCount = 0; @@ -718,7 +718,7 @@ LayerManagerComposite::AutoAddMaskEffect::AutoAddMaskEffect(Layer* aMaskLayer, return; } - mCompositable = static_cast(aMaskLayer->ImplData())->GetCompositableHost(); + mCompositable = ToLayerComposite(aMaskLayer)->GetCompositableHost(); if (!mCompositable) { NS_WARNING("Mask layer with no compositable host"); return; diff --git a/gfx/layers/composite/LayerManagerComposite.h b/gfx/layers/composite/LayerManagerComposite.h index 5bf369302cd..26c3a1b9490 100644 --- a/gfx/layers/composite/LayerManagerComposite.h +++ b/gfx/layers/composite/LayerManagerComposite.h @@ -142,7 +142,7 @@ public: virtual LayersBackend GetBackendType() MOZ_OVERRIDE { - return LAYERS_NONE; + MOZ_CRASH("Shouldn't be called for composited layer manager"); } virtual void GetBackendName(nsAString& name) MOZ_OVERRIDE { @@ -152,7 +152,6 @@ public: virtual already_AddRefed CreateOptimalMaskSurface(const gfxIntSize &aSize) MOZ_OVERRIDE; - virtual const char* Name() const MOZ_OVERRIDE { return ""; } enum WorldTransforPolicy { @@ -189,7 +188,7 @@ public: * layermanager. */ virtual TemporaryRef - CreateDrawTarget(const mozilla::gfx::IntSize &aSize, + CreateDrawTarget(const mozilla::gfx::IntSize& aSize, mozilla::gfx::SurfaceFormat aFormat) MOZ_OVERRIDE; /** @@ -235,7 +234,7 @@ private: nsIntRect mRenderBounds; /** Current root layer. */ - LayerComposite *RootLayer() const; + LayerComposite* RootLayer() const; /** * Recursive helper method for use by ComputeRenderIntegrity. Subtracts From 617e2b26366a254c87e2e8bf01b787135c779094 Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Sun, 8 Dec 2013 18:43:45 -0800 Subject: [PATCH 13/25] Backed out 7 changesets (bug 946958, bug 865033) Backed out changeset 6dd0a6cb9ab3 (bug 946958) Backed out changeset 498152aec5b1 (bug 946958) Backed out changeset 7d035322f51d (bug 946958) Backed out changeset 99f8ad7561ef (bug 946958) Backed out changeset 4639c5abea80 (bug 946958) Backed out changeset 9d1a4d83eccf (bug 865033) Backed out changeset 41839e4026bc (bug 865033) --- gfx/layers/Compositor.h | 1 + gfx/layers/Layers.cpp | 9 +++ gfx/layers/Layers.h | 6 ++ gfx/layers/basic/BasicCompositor.cpp | 2 + gfx/layers/basic/BasicCompositor.h | 4 ++ gfx/layers/client/ClientLayerManager.h | 2 +- .../composite/LayerManagerComposite.cpp | 42 +++++++++++- gfx/layers/composite/LayerManagerComposite.h | 35 +++++++--- gfx/layers/d3d11/CompositorD3D11.h | 8 +++ gfx/layers/d3d9/CompositorD3D9.h | 8 +++ .../ipc/CompositorCocoaWidgetHelper.cpp | 24 +++++++ gfx/layers/ipc/CompositorCocoaWidgetHelper.h | 29 ++++++++ gfx/layers/ipc/CompositorParent.cpp | 67 +++++++------------ gfx/layers/ipc/CompositorParent.h | 7 +- gfx/layers/moz.build | 2 + gfx/layers/opengl/CompositorOGL.h | 3 + gfx/layers/opengl/GLManager.cpp | 21 ++++-- gfx/layers/opengl/GLManager.h | 4 +- layout/ipc/RenderFrameParent.cpp | 3 +- widget/android/nsWindow.cpp | 10 ++- widget/android/nsWindow.h | 4 +- widget/cocoa/nsChildView.h | 6 +- widget/cocoa/nsChildView.mm | 7 +- widget/nsIWidget.h | 24 +++---- widget/xpwidgets/nsBaseWidget.h | 8 +-- 25 files changed, 239 insertions(+), 97 deletions(-) create mode 100644 gfx/layers/ipc/CompositorCocoaWidgetHelper.cpp create mode 100644 gfx/layers/ipc/CompositorCocoaWidgetHelper.h diff --git a/gfx/layers/Compositor.h b/gfx/layers/Compositor.h index cf7023be972..9ed589d387d 100644 --- a/gfx/layers/Compositor.h +++ b/gfx/layers/Compositor.h @@ -431,6 +431,7 @@ public: // XXX I expect we will want to move mWidget into this class and implement // these methods properly. virtual nsIWidget* GetWidget() const { return nullptr; } + virtual const nsIntSize& GetWidgetSize() = 0; // Call before and after any rendering not done by this compositor but which // might affect the compositor's internal state or the state of any APIs it diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp index 14ab891c6b3..53fa38457d5 100644 --- a/gfx/layers/Layers.cpp +++ b/gfx/layers/Layers.cpp @@ -133,6 +133,15 @@ LayerManager::CreateDrawTarget(const IntSize &aSize, CreateOffscreenCanvasDrawTarget(aSize, aFormat); } +TextureFactoryIdentifier +LayerManager::GetTextureFactoryIdentifier() +{ + //TODO[nrc] make pure virtual when all layer managers use Compositor + NS_ERROR("Should have been overridden"); + return TextureFactoryIdentifier(); +} + + #ifdef DEBUG void LayerManager::Mutated(Layer* aLayer) diff --git a/gfx/layers/Layers.h b/gfx/layers/Layers.h index 3776120436b..5495036de96 100644 --- a/gfx/layers/Layers.h +++ b/gfx/layers/Layers.h @@ -437,6 +437,12 @@ public: virtual bool CanUseCanvasLayerForSize(const gfxIntSize &aSize) { return true; } + /** + * Returns a TextureFactoryIdentifier which describes properties of the backend + * used to decide what kind of texture and buffer clients to create + */ + virtual TextureFactoryIdentifier GetTextureFactoryIdentifier(); + /** * returns the maximum texture size on this layer backend, or INT32_MAX * if there is no maximum diff --git a/gfx/layers/basic/BasicCompositor.cpp b/gfx/layers/basic/BasicCompositor.cpp index cc934831b3b..97e8b485f08 100644 --- a/gfx/layers/basic/BasicCompositor.cpp +++ b/gfx/layers/basic/BasicCompositor.cpp @@ -220,6 +220,7 @@ CreateBasicDeprecatedTextureHost(SurfaceDescriptorType aDescriptorType, BasicCompositor::BasicCompositor(nsIWidget *aWidget) : mWidget(aWidget) + , mWidgetSize(-1, -1) { MOZ_COUNT_CTOR(BasicCompositor); sBackend = LAYERS_BASIC; @@ -539,6 +540,7 @@ BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion, nsIntRect intRect; mWidget->GetClientBounds(intRect); Rect rect = Rect(0, 0, intRect.width, intRect.height); + mWidgetSize = intRect.Size(); nsIntRect invalidRect = aInvalidRegion.GetBounds(); mInvalidRect = IntRect(invalidRect.x, invalidRect.y, invalidRect.width, invalidRect.height); diff --git a/gfx/layers/basic/BasicCompositor.h b/gfx/layers/basic/BasicCompositor.h index e4500e6c0d4..ac969937cef 100644 --- a/gfx/layers/basic/BasicCompositor.h +++ b/gfx/layers/basic/BasicCompositor.h @@ -119,6 +119,10 @@ public: virtual const char* Name() const { return "Basic"; } virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; } + virtual const nsIntSize& GetWidgetSize() MOZ_OVERRIDE + { + return mWidgetSize; + } gfx::DrawTarget *GetDrawTarget() { return mDrawTarget; } diff --git a/gfx/layers/client/ClientLayerManager.h b/gfx/layers/client/ClientLayerManager.h index ddff4448933..0955238ead5 100644 --- a/gfx/layers/client/ClientLayerManager.h +++ b/gfx/layers/client/ClientLayerManager.h @@ -73,7 +73,7 @@ public: virtual already_AddRefed CreateColorLayer(); virtual already_AddRefed CreateRefLayer(); - TextureFactoryIdentifier GetTextureFactoryIdentifier() + virtual TextureFactoryIdentifier GetTextureFactoryIdentifier() MOZ_OVERRIDE { return mForwarder->GetTextureFactoryIdentifier(); } diff --git a/gfx/layers/composite/LayerManagerComposite.cpp b/gfx/layers/composite/LayerManagerComposite.cpp index e16fbb2d6a2..ea3a6b0e3c7 100644 --- a/gfx/layers/composite/LayerManagerComposite.cpp +++ b/gfx/layers/composite/LayerManagerComposite.cpp @@ -203,7 +203,6 @@ LayerManagerComposite::EndTransaction(DrawThebesLayerCallback aCallback, EndTransactionFlags aFlags) { NS_ASSERTION(mInTransaction, "Didn't call BeginTransaction?"); - NS_ASSERTION(!aCallback && !aCallbackData, "Not expecting callbacks here"); mInTransaction = false; if (!mIsCompositorReady) { @@ -241,7 +240,13 @@ LayerManagerComposite::EndTransaction(DrawThebesLayerCallback aCallback, // so we don't need to pass any global transform here. mRoot->ComputeEffectiveTransforms(gfx3DMatrix()); + mThebesLayerCallback = aCallback; + mThebesLayerCallbackData = aCallbackData; + Render(); + + mThebesLayerCallback = nullptr; + mThebesLayerCallbackData = nullptr; } mCompositor->SetTargetContext(nullptr); @@ -302,7 +307,7 @@ LayerManagerComposite::RootLayer() const return nullptr; } - return ToLayerComposite(mRoot); + return static_cast(mRoot->ImplData()); } static uint16_t sFrameCount = 0; @@ -718,7 +723,7 @@ LayerManagerComposite::AutoAddMaskEffect::AutoAddMaskEffect(Layer* aMaskLayer, return; } - mCompositable = ToLayerComposite(aMaskLayer)->GetCompositableHost(); + mCompositable = static_cast(aMaskLayer->ImplData())->GetCompositableHost(); if (!mCompositable) { NS_WARNING("Mask layer with no compositable host"); return; @@ -781,6 +786,25 @@ LayerComposite::Destroy() } } +const nsIntSize& +LayerManagerComposite::GetWidgetSize() +{ + return mCompositor->GetWidgetSize(); +} + +void +LayerManagerComposite::SetCompositorID(uint32_t aID) +{ + NS_ASSERTION(mCompositor, "No compositor"); + mCompositor->SetCompositorID(aID); +} + +void +LayerManagerComposite::NotifyShadowTreeTransaction() +{ + mCompositor->NotifyLayersTransaction(); +} + bool LayerManagerComposite::CanUseCanvasLayerForSize(const gfxIntSize &aSize) { @@ -788,6 +812,18 @@ LayerManagerComposite::CanUseCanvasLayerForSize(const gfxIntSize &aSize) aSize.height)); } +TextureFactoryIdentifier +LayerManagerComposite::GetTextureFactoryIdentifier() +{ + return mCompositor->GetTextureFactoryIdentifier(); +} + +int32_t +LayerManagerComposite::GetMaxTextureSize() const +{ + return mCompositor->GetMaxTextureSize(); +} + #ifndef MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS /*static*/ bool diff --git a/gfx/layers/composite/LayerManagerComposite.h b/gfx/layers/composite/LayerManagerComposite.h index 26c3a1b9490..d0097abaf4f 100644 --- a/gfx/layers/composite/LayerManagerComposite.h +++ b/gfx/layers/composite/LayerManagerComposite.h @@ -110,6 +110,8 @@ public: } void BeginTransactionWithDrawTarget(gfx::DrawTarget* aTarget); + void NotifyShadowTreeTransaction(); + virtual bool EndEmptyTransaction(EndTransactionFlags aFlags = END_DEFAULT) MOZ_OVERRIDE; virtual void EndTransaction(DrawThebesLayerCallback aCallback, void* aCallbackData, @@ -117,14 +119,11 @@ public: virtual void SetRoot(Layer* aLayer) MOZ_OVERRIDE { mRoot = aLayer; } - // XXX[nrc]: never called, we should move this logic to ClientLayerManager - // (bug 946926). virtual bool CanUseCanvasLayerForSize(const gfxIntSize &aSize) MOZ_OVERRIDE; - virtual int32_t GetMaxTextureSize() const MOZ_OVERRIDE - { - MOZ_CRASH("Call on compositor, not LayerManagerComposite"); - } + virtual TextureFactoryIdentifier GetTextureFactoryIdentifier() MOZ_OVERRIDE; + + virtual int32_t GetMaxTextureSize() const MOZ_OVERRIDE; virtual void ClearCachedResources(Layer* aSubtree = nullptr) MOZ_OVERRIDE; @@ -142,16 +141,24 @@ public: virtual LayersBackend GetBackendType() MOZ_OVERRIDE { - MOZ_CRASH("Shouldn't be called for composited layer manager"); + return LAYERS_NONE; } virtual void GetBackendName(nsAString& name) MOZ_OVERRIDE { - MOZ_CRASH("Shouldn't be called for composited layer manager"); + MOZ_ASSERT(false, "Shouldn't be called for composited layer manager"); + name.AssignLiteral("Composite"); } virtual already_AddRefed CreateOptimalMaskSurface(const gfxIntSize &aSize) MOZ_OVERRIDE; + + DrawThebesLayerCallback GetThebesLayerCallback() const + { return mThebesLayerCallback; } + + void* GetThebesLayerCallbackData() const + { return mThebesLayerCallbackData; } + virtual const char* Name() const MOZ_OVERRIDE { return ""; } enum WorldTransforPolicy { @@ -188,9 +195,11 @@ public: * layermanager. */ virtual TemporaryRef - CreateDrawTarget(const mozilla::gfx::IntSize& aSize, + CreateDrawTarget(const mozilla::gfx::IntSize &aSize, mozilla::gfx::SurfaceFormat aFormat) MOZ_OVERRIDE; + const nsIntSize& GetWidgetSize(); + /** * Calculates the 'completeness' of the rendering that intersected with the * screen on the last render. This is only useful when progressive tile @@ -208,6 +217,8 @@ public: static void PlatformSyncBeforeReplyUpdate(); + void SetCompositorID(uint32_t aID); + void AddInvalidRegion(const nsIntRegion& aRegion) { mInvalidRegion.Or(mInvalidRegion, aRegion); @@ -234,7 +245,7 @@ private: nsIntRect mRenderBounds; /** Current root layer. */ - LayerComposite* RootLayer() const; + LayerComposite *RootLayer() const; /** * Recursive helper method for use by ComputeRenderIntegrity. Subtracts @@ -264,6 +275,10 @@ private: /** Our more efficient but less powerful alter ego, if one is available. */ nsRefPtr mComposer2D; + /* Thebes layer callbacks; valid at the end of a transaciton, + * while rendering */ + DrawThebesLayerCallback mThebesLayerCallback; + void *mThebesLayerCallbackData; gfxMatrix mWorldMatrix; bool mInTransaction; diff --git a/gfx/layers/d3d11/CompositorD3D11.h b/gfx/layers/d3d11/CompositorD3D11.h index 66441978865..acd767c5d59 100644 --- a/gfx/layers/d3d11/CompositorD3D11.h +++ b/gfx/layers/d3d11/CompositorD3D11.h @@ -139,6 +139,14 @@ public: virtual void NotifyLayersTransaction() MOZ_OVERRIDE { } virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; } + virtual const nsIntSize& GetWidgetSize() MOZ_OVERRIDE + { + NS_ASSERTION(false, "Getting the widget size on windows causes some kind of resizing of buffers. " + "You should not do that outside of BeginFrame, so the best we can do is return " + "the last size we got, that might not be up to date. So you probably shouldn't " + "use this method."); + return mSize; + } ID3D11Device* GetDevice() { return mDevice; } diff --git a/gfx/layers/d3d9/CompositorD3D9.h b/gfx/layers/d3d9/CompositorD3D9.h index 7b96fa561a3..ca8d3542e47 100644 --- a/gfx/layers/d3d9/CompositorD3D9.h +++ b/gfx/layers/d3d9/CompositorD3D9.h @@ -86,6 +86,14 @@ public: virtual void NotifyLayersTransaction() MOZ_OVERRIDE {} virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; } + virtual const nsIntSize& GetWidgetSize() MOZ_OVERRIDE + { + NS_ASSERTION(false, "Getting the widget size on windows causes some kind of resizing of buffers. " + "You should not do that outside of BeginFrame, so the best we can do is return " + "the last size we got, that might not be up to date. So you probably shouldn't " + "use this method."); + return mSize; + } IDirect3DDevice9* device() const { diff --git a/gfx/layers/ipc/CompositorCocoaWidgetHelper.cpp b/gfx/layers/ipc/CompositorCocoaWidgetHelper.cpp new file mode 100644 index 00000000000..40d7d522093 --- /dev/null +++ b/gfx/layers/ipc/CompositorCocoaWidgetHelper.cpp @@ -0,0 +1,24 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set sw=2 ts=2 et tw=80 : */ +/* 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/. */ + +#include "CompositorParent.h" +#include "CompositorCocoaWidgetHelper.h" +#include "nsDebug.h" + +namespace mozilla { +namespace layers { +namespace compositor { + +LayerManagerComposite* +GetLayerManager(CompositorParent* aParent) +{ + return aParent->GetLayerManager(); +} + + +} +} +} diff --git a/gfx/layers/ipc/CompositorCocoaWidgetHelper.h b/gfx/layers/ipc/CompositorCocoaWidgetHelper.h new file mode 100644 index 00000000000..5da00f76789 --- /dev/null +++ b/gfx/layers/ipc/CompositorCocoaWidgetHelper.h @@ -0,0 +1,29 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim: set sw=4 ts=8 et tw=80 : */ +/* 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_layers_CompositorCocoaWidgetHelper_h +#define mozilla_layers_CompositorCocoaWidgetHelper_h + +// Note we can't include IPDL-generated headers here, since this file is being +// used as a workaround for Bug 719036. + +namespace mozilla { +namespace layers { + +class CompositorParent; +class LayerManagerComposite; + +namespace compositor { + +// Needed when we cannot directly include CompositorParent.h since it includes +// an IPDL-generated header (e.g. in widget/cocoa/nsChildView.mm; see Bug 719036). +LayerManagerComposite* GetLayerManager(CompositorParent* aParent); + +} +} +} +#endif // mozilla_layers_CompositorCocoaWidgetHelper_h + diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index 972813961c2..8ca9f571fe6 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -62,7 +62,6 @@ namespace layers { CompositorParent::LayerTreeState::LayerTreeState() : mParent(nullptr) - , mLayerManager(nullptr) { } @@ -238,7 +237,6 @@ CompositorParent::Destroy() // Ensure that the layer manager is destructed on the compositor thread. mLayerManager = nullptr; - mCompositor = nullptr; mCompositionManager = nullptr; mApzcTreeManager->ClearTree(); mApzcTreeManager = nullptr; @@ -265,12 +263,10 @@ CompositorParent::RecvWillStop() LayerTreeState* lts = &it->second; if (lts->mParent == this) { mLayerManager->ClearCachedResources(lts->mRoot); - lts->mLayerManager = nullptr; } } mLayerManager->Destroy(); mLayerManager = nullptr; - mCompositor = nullptr; mCompositionManager = nullptr; } @@ -375,9 +371,7 @@ CompositorParent::ActorDestroy(ActorDestroyReason why) if (mLayerManager) { mLayerManager->Destroy(); mLayerManager = nullptr; - sIndirectLayerTrees[mRootLayerTreeID].mLayerManager = nullptr; mCompositionManager = nullptr; - mCompositor = nullptr; } } @@ -400,7 +394,7 @@ CompositorParent::PauseComposition() if (!mPaused) { mPaused = true; - mCompositor->Pause(); + mLayerManager->GetCompositor()->Pause(); } // if anyone's waiting to make sure that composition really got paused, tell them @@ -415,7 +409,7 @@ CompositorParent::ResumeComposition() MonitorAutoLock lock(mResumeCompositionMonitor); - if (!mCompositor->Resume()) { + if (!mLayerManager->GetCompositor()->Resume()) { #ifdef MOZ_WIDGET_ANDROID // We can't get a surface. This could be because the activity changed between // the time resume was scheduled and now. @@ -446,8 +440,8 @@ CompositorParent::SetEGLSurfaceSize(int width, int height) { NS_ASSERTION(mUseExternalSurfaceSize, "Compositor created without UseExternalSurfaceSize provided"); mEGLSurfaceSize.SizeTo(width, height); - if (mCompositor) { - mCompositor->SetDestinationSurfaceSize(gfx::IntSize(mEGLSurfaceSize.width, mEGLSurfaceSize.height)); + if (mLayerManager) { + mLayerManager->GetCompositor()->SetDestinationSurfaceSize(gfx::IntSize(mEGLSurfaceSize.width, mEGLSurfaceSize.height)); } } @@ -509,7 +503,7 @@ CompositorParent::NotifyShadowTreeTransaction(uint64_t aId, bool aIsFirstPaint) AutoResolveRefLayers resolve(mCompositionManager); mApzcTreeManager->UpdatePanZoomControllerTree(this, mLayerManager->GetRoot(), aIsFirstPaint, aId); - mCompositor->NotifyLayersTransaction(); + mLayerManager->AsLayerManagerComposite()->NotifyShadowTreeTransaction(); } ScheduleComposition(); } @@ -703,7 +697,7 @@ CompositorParent::ShadowLayersUpdated(LayerTransactionParent* aLayerTree, } } ScheduleComposition(); - mCompositor->NotifyLayersTransaction(); + mLayerManager->NotifyShadowTreeTransaction(); } void @@ -712,32 +706,34 @@ CompositorParent::InitializeLayerManager(const nsTArray& aBackend NS_ASSERTION(!mLayerManager, "Already initialised mLayerManager"); for (size_t i = 0; i < aBackendHints.Length(); ++i) { - RefPtr compositor; + RefPtr layerManager; if (aBackendHints[i] == LAYERS_OPENGL) { - compositor = new CompositorOGL(mWidget, - mEGLSurfaceSize.width, - mEGLSurfaceSize.height, - mUseExternalSurfaceSize); + layerManager = + new LayerManagerComposite(new CompositorOGL(mWidget, + mEGLSurfaceSize.width, + mEGLSurfaceSize.height, + mUseExternalSurfaceSize)); } else if (aBackendHints[i] == LAYERS_BASIC) { - compositor = new BasicCompositor(mWidget); + layerManager = + new LayerManagerComposite(new BasicCompositor(mWidget)); #ifdef XP_WIN } else if (aBackendHints[i] == LAYERS_D3D11) { - compositor = new CompositorD3D11(mWidget); + layerManager = + new LayerManagerComposite(new CompositorD3D11(mWidget)); } else if (aBackendHints[i] == LAYERS_D3D9) { - compositor = new CompositorD3D9(this, mWidget); + layerManager = + new LayerManagerComposite(new CompositorD3D9(this, mWidget)); #endif } - MOZ_ASSERT(compositor, "Passed invalid backend hint"); + if (!layerManager) { + continue; + } - compositor->SetCompositorID(mCompositorID); - RefPtr layerManager = new LayerManagerComposite(compositor); + layerManager->SetCompositorID(mCompositorID); if (layerManager->Initialize()) { mLayerManager = layerManager; - MOZ_ASSERT(compositor); - mCompositor = compositor; - sIndirectLayerTrees[mRootLayerTreeID].mLayerManager = layerManager; return; } } @@ -769,7 +765,7 @@ CompositorParent::AllocPLayerTransactionParent(const nsTArray& aB mCompositionManager = new AsyncCompositionManager(mLayerManager); *aSuccess = true; - *aTextureFactoryIdentifier = mCompositor->GetTextureFactoryIdentifier(); + *aTextureFactoryIdentifier = mLayerManager->GetTextureFactoryIdentifier(); LayerTransactionParent* p = new LayerTransactionParent(mLayerManager, this, 0); p->AddIPDLReference(); return p; @@ -925,17 +921,6 @@ CompositorParent::GetAPZCTreeManager(uint64_t aLayersId) return nullptr; } -float -CompositorParent::ComputeRenderIntegrity() -{ - if (mLayerManager) { - return mLayerManager->ComputeRenderIntegrity(); - } - - return 1.0f; -} - - /** * This class handles layer updates pushed directly from child * processes to the compositor thread. It's associated with a @@ -1086,9 +1071,9 @@ CrossProcessCompositorParent::AllocPLayerTransactionParent(const nsTArrayGetCompositor()->GetTextureFactoryIdentifier(); + if (sIndirectLayerTrees[aId].mParent) { + LayerManagerComposite* lm = sIndirectLayerTrees[aId].mParent->GetLayerManager(); + *aTextureFactoryIdentifier = lm->GetTextureFactoryIdentifier(); *aSuccess = true; LayerTransactionParent* p = new LayerTransactionParent(lm, this, aId); p->AddIPDLReference(); diff --git a/gfx/layers/ipc/CompositorParent.h b/gfx/layers/ipc/CompositorParent.h index cfe5a425738..c8f2c46d068 100644 --- a/gfx/layers/ipc/CompositorParent.h +++ b/gfx/layers/ipc/CompositorParent.h @@ -47,7 +47,6 @@ namespace layers { class APZCTreeManager; class AsyncCompositionManager; -class Compositor; class LayerManagerComposite; class LayerTransactionParent; @@ -108,6 +107,8 @@ public: void ForceIsFirstPaint(); void Destroy(); + LayerManagerComposite* GetLayerManager() { return mLayerManager; } + void NotifyChildCreated(uint64_t aChild); void AsyncRender(); @@ -202,7 +203,6 @@ public: nsRefPtr mRoot; nsRefPtr mController; CompositorParent* mParent; - LayerManagerComposite* mLayerManager; TargetConfig mTargetConfig; }; @@ -213,8 +213,6 @@ public: */ static const LayerTreeState* GetIndirectShadowTree(uint64_t aId); - float ComputeRenderIntegrity(); - /** * Tell all CompositorParents to update their last refresh to aTime and sample * animations at this time stamp. If aIsTesting is true, the @@ -297,7 +295,6 @@ private: bool CanComposite(); nsRefPtr mLayerManager; - nsRefPtr mCompositor; RefPtr mCompositionManager; nsIWidget* mWidget; CancelableTask *mCurrentCompositeTask; diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build index 9af45accae0..6b5d77857bf 100644 --- a/gfx/layers/moz.build +++ b/gfx/layers/moz.build @@ -128,6 +128,7 @@ EXPORTS.mozilla.layers += [ 'ipc/CompositableForwarder.h', 'ipc/CompositableTransactionParent.h', 'ipc/CompositorChild.h', + 'ipc/CompositorCocoaWidgetHelper.h', 'ipc/CompositorParent.h', 'ipc/GeckoContentController.h', 'ipc/GestureEventListener.h', @@ -239,6 +240,7 @@ UNIFIED_SOURCES += [ 'ipc/Axis.cpp', 'ipc/CompositableTransactionParent.cpp', 'ipc/CompositorChild.cpp', + 'ipc/CompositorCocoaWidgetHelper.cpp', 'ipc/CompositorParent.cpp', 'ipc/GestureEventListener.cpp', 'ipc/ImageBridgeChild.cpp', diff --git a/gfx/layers/opengl/CompositorOGL.h b/gfx/layers/opengl/CompositorOGL.h index e6427a593fb..72a3db542fd 100644 --- a/gfx/layers/opengl/CompositorOGL.h +++ b/gfx/layers/opengl/CompositorOGL.h @@ -158,6 +158,9 @@ public: virtual bool Resume() MOZ_OVERRIDE; virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; } + virtual const nsIntSize& GetWidgetSize() MOZ_OVERRIDE { + return mWidgetSize; + } GLContext* gl() const { return mGLContext; } ShaderProgramType GetFBOLayerProgramType() const { diff --git a/gfx/layers/opengl/GLManager.cpp b/gfx/layers/opengl/GLManager.cpp index 6aaa1eb9916..f6a610c6eb4 100644 --- a/gfx/layers/opengl/GLManager.cpp +++ b/gfx/layers/opengl/GLManager.cpp @@ -6,6 +6,7 @@ #include "GLManager.h" #include "CompositorOGL.h" // for CompositorOGL #include "GLContext.h" // for GLContext +#include "Layers.h" // for LayerManager #include "mozilla/Assertions.h" // for MOZ_CRASH #include "mozilla/Attributes.h" // for MOZ_OVERRIDE #include "mozilla/RefPtr.h" // for RefPtr @@ -14,6 +15,7 @@ #include "mozilla/layers/LayersTypes.h" #include "mozilla/mozalloc.h" // for operator new, etc #include "nsAutoPtr.h" // for nsRefPtr +#include "nsISupportsImpl.h" // for LayerManager::AddRef, etc using namespace mozilla::gl; @@ -47,14 +49,21 @@ private: }; /* static */ GLManager* -GLManager::CreateGLManager(LayerManagerComposite* aManager) +GLManager::CreateGLManager(LayerManager* aManager) { - if (aManager && - Compositor::GetBackend() == LAYERS_OPENGL) { - return new GLManagerCompositor(static_cast( - aManager->GetCompositor())); + if (!aManager) { + return nullptr; } - return nullptr; + if (aManager->GetBackendType() == LAYERS_NONE) { + if (Compositor::GetBackend() == LAYERS_OPENGL) { + return new GLManagerCompositor(static_cast( + static_cast(aManager)->GetCompositor())); + } else { + return nullptr; + } + } + + MOZ_CRASH("Cannot create GLManager for non-GL layer manager"); } } diff --git a/gfx/layers/opengl/GLManager.h b/gfx/layers/opengl/GLManager.h index 8319122a17b..32c84484bc5 100644 --- a/gfx/layers/opengl/GLManager.h +++ b/gfx/layers/opengl/GLManager.h @@ -16,7 +16,7 @@ class GLContext; namespace layers { -class LayerManagerComposite; +class LayerManager; /** * Minimal interface to allow widgets to draw using OpenGL. Abstracts @@ -26,7 +26,7 @@ class LayerManagerComposite; class GLManager { public: - static GLManager* CreateGLManager(LayerManagerComposite* aManager); + static GLManager* CreateGLManager(LayerManager* aManager); virtual ~GLManager() {} diff --git a/layout/ipc/RenderFrameParent.cpp b/layout/ipc/RenderFrameParent.cpp index 820bb239be5..c65ff48db0a 100644 --- a/layout/ipc/RenderFrameParent.cpp +++ b/layout/ipc/RenderFrameParent.cpp @@ -647,8 +647,7 @@ RenderFrameParent::RenderFrameParent(nsFrameLoader* aFrameLoader, nsRefPtr lm = GetFrom(mFrameLoader); // Perhaps the document containing this frame currently has no presentation? if (lm && lm->GetBackendType() == LAYERS_CLIENT) { - *aTextureFactoryIdentifier = - static_cast(lm.get())->GetTextureFactoryIdentifier(); + *aTextureFactoryIdentifier = lm->GetTextureFactoryIdentifier(); } else { *aTextureFactoryIdentifier = TextureFactoryIdentifier(); } diff --git a/widget/android/nsWindow.cpp b/widget/android/nsWindow.cpp index 5ff850c3814..ae33928593f 100644 --- a/widget/android/nsWindow.cpp +++ b/widget/android/nsWindow.cpp @@ -2328,7 +2328,7 @@ nsWindow::GetIMEUpdatePreference() } void -nsWindow::DrawWindowUnderlay(LayerManagerComposite* aManager, nsIntRect aRect) +nsWindow::DrawWindowUnderlay(LayerManager* aManager, nsIntRect aRect) { JNIEnv *env = GetJNIForThread(); NS_ABORT_IF_FALSE(env, "No JNI environment at DrawWindowUnderlay()!"); @@ -2362,7 +2362,7 @@ nsWindow::DrawWindowUnderlay(LayerManagerComposite* aManager, nsIntRect aRect) } void -nsWindow::DrawWindowOverlay(LayerManagerComposite* aManager, nsIntRect aRect) +nsWindow::DrawWindowOverlay(LayerManager* aManager, nsIntRect aRect) { PROFILER_LABEL("nsWindow", "DrawWindowOverlay"); JNIEnv *env = GetJNIForThread(); @@ -2430,7 +2430,11 @@ float nsWindow::ComputeRenderIntegrity() { if (sCompositorParent) { - return sCompositorParent->ComputeRenderIntegrity(); + mozilla::layers::LayerManagerComposite* manager = + static_cast(sCompositorParent->GetLayerManager()); + if (manager) { + return manager->ComputeRenderIntegrity(); + } } return 1.f; diff --git a/widget/android/nsWindow.h b/widget/android/nsWindow.h index 28ce60a3bff..1a84c79bf44 100644 --- a/widget/android/nsWindow.h +++ b/widget/android/nsWindow.h @@ -153,8 +153,8 @@ public: NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent); virtual bool NeedsPaint(); - virtual void DrawWindowUnderlay(LayerManagerComposite* aManager, nsIntRect aRect); - virtual void DrawWindowOverlay(LayerManagerComposite* aManager, nsIntRect aRect); + virtual void DrawWindowUnderlay(LayerManager* aManager, nsIntRect aRect); + virtual void DrawWindowOverlay(LayerManager* aManager, nsIntRect aRect); virtual mozilla::layers::CompositorParent* NewCompositorParent(int aSurfaceWidth, int aSurfaceHeight) MOZ_OVERRIDE; diff --git a/widget/cocoa/nsChildView.h b/widget/cocoa/nsChildView.h index d3a355ed677..3d19739a751 100644 --- a/widget/cocoa/nsChildView.h +++ b/widget/cocoa/nsChildView.h @@ -549,9 +549,9 @@ public: virtual gfxASurface* GetThebesSurface(); virtual void PrepareWindowEffects() MOZ_OVERRIDE; virtual void CleanupWindowEffects() MOZ_OVERRIDE; - virtual bool PreRender(LayerManagerComposite* aManager) MOZ_OVERRIDE; - virtual void PostRender(LayerManagerComposite* aManager) MOZ_OVERRIDE; - virtual void DrawWindowOverlay(LayerManagerComposite* aManager, nsIntRect aRect) MOZ_OVERRIDE; + virtual bool PreRender(LayerManager* aManager) MOZ_OVERRIDE; + virtual void PostRender(LayerManager* aManager) MOZ_OVERRIDE; + virtual void DrawWindowOverlay(LayerManager* aManager, nsIntRect aRect) MOZ_OVERRIDE; virtual void UpdateThemeGeometries(const nsTArray& aThemeGeometries); diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index 05958ee5660..7949b6ce008 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -63,6 +63,7 @@ #include "GLContext.h" #include "GLUploadHelpers.h" #include "mozilla/layers/GLManager.h" +#include "mozilla/layers/CompositorCocoaWidgetHelper.h" #include "mozilla/layers/CompositorOGL.h" #include "mozilla/layers/BasicCompositor.h" #include "gfxUtils.h" @@ -2046,7 +2047,7 @@ nsChildView::CleanupWindowEffects() } bool -nsChildView::PreRender(LayerManagerComposite* aManager) +nsChildView::PreRender(LayerManager* aManager) { nsAutoPtr manager(GLManager::CreateGLManager(aManager)); if (!manager) { @@ -2068,7 +2069,7 @@ nsChildView::PreRender(LayerManagerComposite* aManager) } void -nsChildView::PostRender(LayerManagerComposite* aManager) +nsChildView::PostRender(LayerManager* aManager) { nsAutoPtr manager(GLManager::CreateGLManager(aManager)); if (!manager) { @@ -2080,7 +2081,7 @@ nsChildView::PostRender(LayerManagerComposite* aManager) } void -nsChildView::DrawWindowOverlay(LayerManagerComposite* aManager, nsIntRect aRect) +nsChildView::DrawWindowOverlay(LayerManager* aManager, nsIntRect aRect) { nsAutoPtr manager(GLManager::CreateGLManager(aManager)); if (manager) { diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h index 498d5647e79..80050c3286e 100644 --- a/widget/nsIWidget.h +++ b/widget/nsIWidget.h @@ -41,7 +41,6 @@ namespace layers { class Composer2D; class CompositorChild; class LayerManager; -class LayerManagerComposite; class PLayerTransactionChild; } namespace gfx { @@ -97,8 +96,8 @@ typedef void* nsNativeWidget; #endif #define NS_IWIDGET_IID \ -{ 0x746cb189, 0x9793, 0x4e53, \ - { 0x89, 0x47, 0x78, 0x56, 0xb6, 0xcd, 0x9f, 0x71 } } +{ 0xa1f684e6, 0x2ae1, 0x4513, \ + { 0xb6, 0x89, 0xf4, 0xd4, 0xfe, 0x9d, 0x2c, 0xdb } } /* * Window shadow styles @@ -465,7 +464,6 @@ class nsIWidget : public nsISupports { typedef mozilla::layers::Composer2D Composer2D; typedef mozilla::layers::CompositorChild CompositorChild; typedef mozilla::layers::LayerManager LayerManager; - typedef mozilla::layers::LayerManagerComposite LayerManagerComposite; typedef mozilla::layers::LayersBackend LayersBackend; typedef mozilla::layers::PLayerTransactionChild PLayerTransactionChild; typedef mozilla::widget::NotificationToIME NotificationToIME; @@ -1218,36 +1216,38 @@ class nsIWidget : public nsISupports { virtual void CleanupWindowEffects() = 0; /** - * Called before rendering using OMTC. Returns false when the widget is + * Called before rendering using OpenGL. Returns false when the widget is * not ready to be rendered (for example while the window is closed). * * Always called from the compositing thread, which may be the main-thread if * OMTC is not enabled. */ - virtual bool PreRender(LayerManagerComposite* aManager) = 0; + virtual bool PreRender(LayerManager* aManager) = 0; /** - * Called after rendering using OMTC. Not called when rendering was + * Called after rendering using OpenGL. Not called when rendering was * cancelled by a negative return value from PreRender. * * Always called from the compositing thread, which may be the main-thread if * OMTC is not enabled. */ - virtual void PostRender(LayerManagerComposite* aManager) = 0; + virtual void PostRender(LayerManager* aManager) = 0; /** * Called before the LayerManager draws the layer tree. * - * Always called from the compositing thread. + * Always called from the compositing thread, which may be the main-thread if + * OMTC is not enabled. */ - virtual void DrawWindowUnderlay(LayerManagerComposite* aManager, nsIntRect aRect) = 0; + virtual void DrawWindowUnderlay(LayerManager* aManager, nsIntRect aRect) = 0; /** * Called after the LayerManager draws the layer tree * - * Always called from the compositing thread. + * Always called from the compositing thread, which may be the main-thread if + * OMTC is not enabled. */ - virtual void DrawWindowOverlay(LayerManagerComposite* aManager, nsIntRect aRect) = 0; + virtual void DrawWindowOverlay(LayerManager* aManager, nsIntRect aRect) = 0; /** * Return a DrawTarget for the window which can be composited into. diff --git a/widget/xpwidgets/nsBaseWidget.h b/widget/xpwidgets/nsBaseWidget.h index 283ecf67b79..7e66bc3a073 100644 --- a/widget/xpwidgets/nsBaseWidget.h +++ b/widget/xpwidgets/nsBaseWidget.h @@ -136,10 +136,10 @@ public: virtual void CreateCompositor(int aWidth, int aHeight); virtual void PrepareWindowEffects() {} virtual void CleanupWindowEffects() {} - virtual bool PreRender(LayerManagerComposite* aManager) { return true; } - virtual void PostRender(LayerManagerComposite* aManager) {} - virtual void DrawWindowUnderlay(LayerManagerComposite* aManager, nsIntRect aRect) {} - virtual void DrawWindowOverlay(LayerManagerComposite* aManager, nsIntRect aRect) {} + virtual bool PreRender(LayerManager* aManager) { return true; } + virtual void PostRender(LayerManager* aManager) {} + virtual void DrawWindowUnderlay(LayerManager* aManager, nsIntRect aRect) {} + virtual void DrawWindowOverlay(LayerManager* aManager, nsIntRect aRect) {} virtual mozilla::TemporaryRef StartRemoteDrawing(); virtual void EndRemoteDrawing() { }; virtual void CleanupRemoteDrawing() { }; From f8bd1a35b46c9d7f5af8d58d9f4b421c92f89605 Mon Sep 17 00:00:00 2001 From: Cykesiopka Date: Sun, 8 Dec 2013 21:51:26 -0500 Subject: [PATCH 14/25] Bug 342135 - Remove stale comment in nsICharsetConverterManager.idl. r=emk --- intl/uconv/idl/nsICharsetConverterManager.idl | 1 - 1 file changed, 1 deletion(-) diff --git a/intl/uconv/idl/nsICharsetConverterManager.idl b/intl/uconv/idl/nsICharsetConverterManager.idl index e42d407a27c..a39ef5d846e 100644 --- a/intl/uconv/idl/nsICharsetConverterManager.idl +++ b/intl/uconv/idl/nsICharsetConverterManager.idl @@ -14,7 +14,6 @@ #define NS_ICHARSETCONVERTERMANAGER_CID \ {0x3c1c0163, 0x9bd0, 0x11d3, { 0x9d, 0x9, 0x0, 0x50, 0x4, 0x0, 0x7, 0xb2}} -// XXX change to NS_CHARSETCONVERTERMANAGER_PID #define NS_CHARSETCONVERTERMANAGER_CONTRACTID "@mozilla.org/charset-converter-manager;1" %} From 2a97f4dc0d5b19548fc205fd5a326ce801d13508 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sun, 8 Dec 2013 21:52:33 -0500 Subject: [PATCH 15/25] Bug 713082 - Part 1: Remove unnecessary Util.h includes. r=Waldo --- content/base/src/nsGkAtoms.cpp | 2 -- content/base/src/nsINode.cpp | 1 - content/html/content/src/HTMLBRElement.cpp | 1 - content/html/content/src/HTMLBodyElement.cpp | 2 -- content/html/content/src/HTMLDivElement.cpp | 2 -- content/html/content/src/HTMLFontElement.cpp | 2 -- content/html/content/src/HTMLFrameElement.cpp | 1 - content/html/content/src/HTMLHeadingElement.cpp | 1 - content/html/content/src/HTMLIFrameElement.cpp | 2 -- content/html/content/src/HTMLImageElement.cpp | 2 -- content/html/content/src/HTMLLIElement.h | 2 +- content/html/content/src/HTMLObjectElement.cpp | 2 -- content/html/content/src/HTMLOptionsCollection.cpp | 1 - content/html/content/src/HTMLParagraphElement.h | 1 - content/html/content/src/HTMLPreElement.h | 1 - content/html/content/src/HTMLSelectElement.cpp | 1 - content/html/content/src/HTMLSharedListElement.h | 2 +- content/html/content/src/HTMLSharedObjectElement.cpp | 1 - content/html/content/src/HTMLTableCaptionElement.cpp | 2 -- content/html/content/src/HTMLTableCellElement.cpp | 2 -- content/html/content/src/HTMLTableColElement.cpp | 2 -- content/html/content/src/HTMLTableElement.cpp | 2 -- content/html/content/src/HTMLTableRowElement.cpp | 2 -- content/html/content/src/HTMLTableSectionElement.cpp | 2 -- content/html/content/src/HTMLTextAreaElement.cpp | 1 - content/html/content/src/HTMLVideoElement.cpp | 2 -- content/html/content/src/nsFormSubmission.cpp | 2 -- content/media/webrtc/LoadMonitor.cpp | 1 - content/svg/content/src/DOMSVGPathSeg.cpp | 2 -- content/xul/templates/src/nsRuleNetwork.cpp | 2 -- dom/audiochannel/AudioChannelService.cpp | 1 - dom/audiochannel/AudioChannelServiceChild.cpp | 1 - dom/base/nsGlobalWindow.cpp | 1 - dom/bindings/CallbackObject.h | 1 - dom/bindings/DOMJSProxyHandler.cpp | 2 -- dom/bindings/TypedArray.h | 1 - dom/bluetooth/BluetoothAdapter.cpp | 1 - dom/bluetooth/BluetoothManager.cpp | 1 - dom/bluetooth/BluetoothService.cpp | 1 - dom/bluetooth/ipc/BluetoothParent.cpp | 1 - dom/indexedDB/IndexedDatabaseManager.cpp | 1 - dom/indexedDB/ipc/IndexedDBParent.cpp | 1 - dom/speakermanager/SpeakerManagerService.cpp | 1 - dom/speakermanager/SpeakerManagerServiceChild.cpp | 1 - dom/workers/WorkerPrivate.cpp | 1 - editor/libeditor/html/nsEditProperty.cpp | 2 -- gfx/2d/Blur.cpp | 1 - gfx/gl/GLLibraryLoader.h | 1 - gfx/ipc/GfxMessageUtils.h | 1 - gfx/layers/LayerScope.cpp | 2 -- gfx/thebes/gfxPangoFonts.cpp | 2 -- hal/Hal.cpp | 1 - image/src/SurfaceCache.cpp | 1 - ipc/dbus/DBusThread.cpp | 1 - ipc/unixsocket/UnixSocket.cpp | 1 - js/src/gc/Zone.h | 1 - js/src/jsopcode.cpp | 3 --- js/xpconnect/shell/xpcshell.cpp | 1 - js/xpconnect/src/xpcprivate.h | 1 - layout/generic/nsBlockFrame.cpp | 1 - layout/generic/nsLineLayout.cpp | 1 - layout/inspector/inDOMView.cpp | 2 -- layout/style/nsCSSScanner.cpp | 2 -- memory/mozalloc/throw_gcc.h | 1 - mfbt/BloomFilter.h | 1 - parser/html/nsHtml5Atoms.cpp | 2 -- parser/htmlparser/src/CNavDTD.cpp | 2 -- parser/htmlparser/src/nsHTMLTags.cpp | 2 -- rdf/base/src/nsRDFContentSink.cpp | 2 -- storage/src/TelemetryVFS.cpp | 1 - storage/src/mozStorageStatementData.h | 1 - toolkit/components/places/nsNavBookmarks.cpp | 1 - toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp | 1 - tools/profiler/GeckoProfilerImpl.h | 1 - tools/profiler/platform.h | 1 - widget/android/AndroidBridge.cpp | 1 - widget/android/AndroidJNIWrapper.cpp | 2 -- widget/gonk/libdisplay/BootAnimation.cpp | 1 - widget/gtk/nsColorPicker.cpp | 1 - widget/gtk/nsFilePicker.cpp | 2 +- widget/windows/nsWindow.cpp | 1 - xpcom/tests/MoreTestingAtoms.cpp | 2 -- xpcom/tests/TestingAtoms.cpp | 2 -- 83 files changed, 3 insertions(+), 115 deletions(-) diff --git a/content/base/src/nsGkAtoms.cpp b/content/base/src/nsGkAtoms.cpp index 95ab827aa35..58cfaf28080 100644 --- a/content/base/src/nsGkAtoms.cpp +++ b/content/base/src/nsGkAtoms.cpp @@ -9,8 +9,6 @@ * is loaded and they are destroyed when gklayout is unloaded. */ -#include "mozilla/Util.h" - #include "nsGkAtoms.h" #include "nsStaticAtom.h" diff --git a/content/base/src/nsINode.cpp b/content/base/src/nsINode.cpp index 3d159100755..686881736a6 100644 --- a/content/base/src/nsINode.cpp +++ b/content/base/src/nsINode.cpp @@ -18,7 +18,6 @@ #include "mozilla/MemoryReporting.h" #include "mozilla/MutationEvent.h" #include "mozilla/Telemetry.h" -#include "mozilla/Util.h" #include "nsAsyncDOMEvent.h" #include "nsAttrValueOrString.h" #include "nsBindingManager.h" diff --git a/content/html/content/src/HTMLBRElement.cpp b/content/html/content/src/HTMLBRElement.cpp index 4ab581268d1..cd24478b595 100644 --- a/content/html/content/src/HTMLBRElement.cpp +++ b/content/html/content/src/HTMLBRElement.cpp @@ -5,7 +5,6 @@ #include "mozilla/dom/HTMLBRElement.h" #include "mozilla/dom/HTMLBRElementBinding.h" -#include "mozilla/Util.h" #include "nsAttrValueInlines.h" #include "nsStyleConsts.h" diff --git a/content/html/content/src/HTMLBodyElement.cpp b/content/html/content/src/HTMLBodyElement.cpp index 3b26f832c7e..9f17f945eb0 100644 --- a/content/html/content/src/HTMLBodyElement.cpp +++ b/content/html/content/src/HTMLBodyElement.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "HTMLBodyElement.h" #include "mozilla/dom/HTMLBodyElementBinding.h" #include "nsAttrValueInlines.h" diff --git a/content/html/content/src/HTMLDivElement.cpp b/content/html/content/src/HTMLDivElement.cpp index 73f1e349fd2..b0102b1ec4d 100644 --- a/content/html/content/src/HTMLDivElement.cpp +++ b/content/html/content/src/HTMLDivElement.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "HTMLDivElement.h" #include "nsGenericHTMLElement.h" #include "nsStyleConsts.h" diff --git a/content/html/content/src/HTMLFontElement.cpp b/content/html/content/src/HTMLFontElement.cpp index 1a8dc426ce1..7834b6be8e3 100644 --- a/content/html/content/src/HTMLFontElement.cpp +++ b/content/html/content/src/HTMLFontElement.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "HTMLFontElement.h" #include "mozilla/dom/HTMLFontElementBinding.h" #include "nsAttrValueInlines.h" diff --git a/content/html/content/src/HTMLFrameElement.cpp b/content/html/content/src/HTMLFrameElement.cpp index b7799ba4c8d..51bcf5526af 100644 --- a/content/html/content/src/HTMLFrameElement.cpp +++ b/content/html/content/src/HTMLFrameElement.cpp @@ -5,7 +5,6 @@ #include "mozilla/dom/HTMLFrameElement.h" #include "mozilla/dom/HTMLFrameElementBinding.h" -#include "mozilla/Util.h" class nsIDOMDocument; diff --git a/content/html/content/src/HTMLHeadingElement.cpp b/content/html/content/src/HTMLHeadingElement.cpp index 13d3c6b3d52..b0003cadaea 100644 --- a/content/html/content/src/HTMLHeadingElement.cpp +++ b/content/html/content/src/HTMLHeadingElement.cpp @@ -6,7 +6,6 @@ #include "mozilla/dom/HTMLHeadingElement.h" #include "mozilla/dom/HTMLHeadingElementBinding.h" -#include "mozilla/Util.h" #include "nsGkAtoms.h" #include "nsStyleConsts.h" #include "nsMappedAttributes.h" diff --git a/content/html/content/src/HTMLIFrameElement.cpp b/content/html/content/src/HTMLIFrameElement.cpp index 4d76ec059bd..132739ae9a6 100644 --- a/content/html/content/src/HTMLIFrameElement.cpp +++ b/content/html/content/src/HTMLIFrameElement.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "mozilla/dom/HTMLIFrameElement.h" #include "mozilla/dom/HTMLIFrameElementBinding.h" #include "nsMappedAttributes.h" diff --git a/content/html/content/src/HTMLImageElement.cpp b/content/html/content/src/HTMLImageElement.cpp index a5968e1b88a..3bffa10f904 100644 --- a/content/html/content/src/HTMLImageElement.cpp +++ b/content/html/content/src/HTMLImageElement.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "mozilla/dom/HTMLImageElement.h" #include "mozilla/dom/HTMLImageElementBinding.h" #include "nsGkAtoms.h" diff --git a/content/html/content/src/HTMLLIElement.h b/content/html/content/src/HTMLLIElement.h index 45ae622ca61..86ed5df34b3 100644 --- a/content/html/content/src/HTMLLIElement.h +++ b/content/html/content/src/HTMLLIElement.h @@ -7,7 +7,7 @@ #define mozilla_dom_HTMLLIElement_h #include "mozilla/Attributes.h" -#include "mozilla/Util.h" + #include "nsIDOMHTMLLIElement.h" #include "nsGenericHTMLElement.h" diff --git a/content/html/content/src/HTMLObjectElement.cpp b/content/html/content/src/HTMLObjectElement.cpp index 5109fa7237f..d6158371fca 100644 --- a/content/html/content/src/HTMLObjectElement.cpp +++ b/content/html/content/src/HTMLObjectElement.cpp @@ -5,8 +5,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/dom/HTMLObjectElement.h" -#include "mozilla/Util.h" - #include "mozilla/dom/HTMLObjectElementBinding.h" #include "mozilla/dom/ElementInlines.h" #include "nsAutoPtr.h" diff --git a/content/html/content/src/HTMLOptionsCollection.cpp b/content/html/content/src/HTMLOptionsCollection.cpp index d0e5c979905..9397987546a 100644 --- a/content/html/content/src/HTMLOptionsCollection.cpp +++ b/content/html/content/src/HTMLOptionsCollection.cpp @@ -12,7 +12,6 @@ #include "mozilla/dom/HTMLOptionElement.h" #include "mozilla/dom/HTMLOptionsCollectionBinding.h" #include "mozilla/dom/HTMLSelectElement.h" -#include "mozilla/Util.h" #include "nsContentCreatorFunctions.h" #include "nsError.h" #include "nsEventDispatcher.h" diff --git a/content/html/content/src/HTMLParagraphElement.h b/content/html/content/src/HTMLParagraphElement.h index fecfc845c9a..5dc2381579d 100644 --- a/content/html/content/src/HTMLParagraphElement.h +++ b/content/html/content/src/HTMLParagraphElement.h @@ -7,7 +7,6 @@ #define mozilla_dom_HTMLParagraphElement_h #include "mozilla/Attributes.h" -#include "mozilla/Util.h" #include "nsIDOMHTMLParagraphElement.h" #include "nsGenericHTMLElement.h" diff --git a/content/html/content/src/HTMLPreElement.h b/content/html/content/src/HTMLPreElement.h index 831a0d131ad..2640c08c1d1 100644 --- a/content/html/content/src/HTMLPreElement.h +++ b/content/html/content/src/HTMLPreElement.h @@ -7,7 +7,6 @@ #define mozilla_dom_HTMLPreElement_h #include "mozilla/Attributes.h" -#include "mozilla/Util.h" #include "nsIDOMHTMLPreElement.h" #include "nsGenericHTMLElement.h" diff --git a/content/html/content/src/HTMLSelectElement.cpp b/content/html/content/src/HTMLSelectElement.cpp index ef409cb5603..f72b032938e 100644 --- a/content/html/content/src/HTMLSelectElement.cpp +++ b/content/html/content/src/HTMLSelectElement.cpp @@ -11,7 +11,6 @@ #include "mozilla/dom/HTMLOptGroupElement.h" #include "mozilla/dom/HTMLOptionElement.h" #include "mozilla/dom/HTMLSelectElementBinding.h" -#include "mozilla/Util.h" #include "nsContentCreatorFunctions.h" #include "nsContentList.h" #include "nsError.h" diff --git a/content/html/content/src/HTMLSharedListElement.h b/content/html/content/src/HTMLSharedListElement.h index 71123998a3d..000fed30a36 100644 --- a/content/html/content/src/HTMLSharedListElement.h +++ b/content/html/content/src/HTMLSharedListElement.h @@ -5,8 +5,8 @@ #ifndef mozilla_dom_HTMLSharedListElement_h #define mozilla_dom_HTMLSharedListElement_h + #include "mozilla/Attributes.h" -#include "mozilla/Util.h" #include "nsIDOMHTMLOListElement.h" #include "nsIDOMHTMLUListElement.h" diff --git a/content/html/content/src/HTMLSharedObjectElement.cpp b/content/html/content/src/HTMLSharedObjectElement.cpp index 925d37c3eeb..798dc122fc5 100644 --- a/content/html/content/src/HTMLSharedObjectElement.cpp +++ b/content/html/content/src/HTMLSharedObjectElement.cpp @@ -8,7 +8,6 @@ #include "mozilla/dom/HTMLEmbedElementBinding.h" #include "mozilla/dom/HTMLAppletElementBinding.h" #include "mozilla/dom/ElementInlines.h" -#include "mozilla/Util.h" #include "nsIDocument.h" #include "nsIPluginDocument.h" diff --git a/content/html/content/src/HTMLTableCaptionElement.cpp b/content/html/content/src/HTMLTableCaptionElement.cpp index 07330cba30b..2ac62f3884c 100644 --- a/content/html/content/src/HTMLTableCaptionElement.cpp +++ b/content/html/content/src/HTMLTableCaptionElement.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "mozilla/dom/HTMLTableCaptionElement.h" #include "nsAttrValueInlines.h" #include "nsMappedAttributes.h" diff --git a/content/html/content/src/HTMLTableCellElement.cpp b/content/html/content/src/HTMLTableCellElement.cpp index 97235acc22b..7d1ffaf02c6 100644 --- a/content/html/content/src/HTMLTableCellElement.cpp +++ b/content/html/content/src/HTMLTableCellElement.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "mozilla/dom/HTMLTableCellElement.h" #include "mozilla/dom/HTMLTableElement.h" #include "mozilla/dom/HTMLTableRowElement.h" diff --git a/content/html/content/src/HTMLTableColElement.cpp b/content/html/content/src/HTMLTableColElement.cpp index 450f07a7439..46a8d33fe4f 100644 --- a/content/html/content/src/HTMLTableColElement.cpp +++ b/content/html/content/src/HTMLTableColElement.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "mozilla/dom/HTMLTableColElement.h" #include "nsMappedAttributes.h" #include "nsAttrValueInlines.h" diff --git a/content/html/content/src/HTMLTableElement.cpp b/content/html/content/src/HTMLTableElement.cpp index 1296bc42db2..618e345e080 100644 --- a/content/html/content/src/HTMLTableElement.cpp +++ b/content/html/content/src/HTMLTableElement.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "mozilla/dom/HTMLTableElement.h" #include "nsAttrValueInlines.h" #include "nsRuleData.h" diff --git a/content/html/content/src/HTMLTableRowElement.cpp b/content/html/content/src/HTMLTableRowElement.cpp index 584636ad058..46a7bf0161b 100644 --- a/content/html/content/src/HTMLTableRowElement.cpp +++ b/content/html/content/src/HTMLTableRowElement.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "mozilla/dom/HTMLTableRowElement.h" #include "mozilla/dom/HTMLTableElement.h" #include "nsMappedAttributes.h" diff --git a/content/html/content/src/HTMLTableSectionElement.cpp b/content/html/content/src/HTMLTableSectionElement.cpp index 572e0ab4618..e10e4e5e6b2 100644 --- a/content/html/content/src/HTMLTableSectionElement.cpp +++ b/content/html/content/src/HTMLTableSectionElement.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "mozilla/dom/HTMLTableSectionElement.h" #include "nsMappedAttributes.h" #include "nsAttrValueInlines.h" diff --git a/content/html/content/src/HTMLTextAreaElement.cpp b/content/html/content/src/HTMLTextAreaElement.cpp index ce379b59e93..0f22ac66a9f 100644 --- a/content/html/content/src/HTMLTextAreaElement.cpp +++ b/content/html/content/src/HTMLTextAreaElement.cpp @@ -10,7 +10,6 @@ #include "mozilla/Attributes.h" #include "mozilla/dom/HTMLTextAreaElementBinding.h" #include "mozilla/MouseEvents.h" -#include "mozilla/Util.h" #include "nsAttrValueInlines.h" #include "nsContentCID.h" #include "nsContentCreatorFunctions.h" diff --git a/content/html/content/src/HTMLVideoElement.cpp b/content/html/content/src/HTMLVideoElement.cpp index 491668ce71e..1bc49191876 100644 --- a/content/html/content/src/HTMLVideoElement.cpp +++ b/content/html/content/src/HTMLVideoElement.cpp @@ -4,8 +4,6 @@ * 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 "mozilla/Util.h" - #include "nsIDOMHTMLVideoElement.h" #include "nsIDOMHTMLSourceElement.h" #include "mozilla/dom/HTMLVideoElement.h" diff --git a/content/html/content/src/nsFormSubmission.cpp b/content/html/content/src/nsFormSubmission.cpp index 7885f8a9fa6..df67b79f103 100644 --- a/content/html/content/src/nsFormSubmission.cpp +++ b/content/html/content/src/nsFormSubmission.cpp @@ -4,8 +4,6 @@ * 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 "mozilla/Util.h" - #include "nsFormSubmission.h" #include "nsCOMPtr.h" diff --git a/content/media/webrtc/LoadMonitor.cpp b/content/media/webrtc/LoadMonitor.cpp index e140e063644..a265e568420 100644 --- a/content/media/webrtc/LoadMonitor.cpp +++ b/content/media/webrtc/LoadMonitor.cpp @@ -19,7 +19,6 @@ #include "nsIServiceManager.h" #include "mozilla/TimeStamp.h" -#include "mozilla/Util.h" #include "mozilla/Services.h" #if defined(ANDROID) || defined(LINUX) || defined(XP_MACOSX) diff --git a/content/svg/content/src/DOMSVGPathSeg.cpp b/content/svg/content/src/DOMSVGPathSeg.cpp index 3f35f642503..e16d9d44fbc 100644 --- a/content/svg/content/src/DOMSVGPathSeg.cpp +++ b/content/svg/content/src/DOMSVGPathSeg.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "DOMSVGPathSeg.h" #include "DOMSVGPathSegList.h" #include "SVGAnimatedPathSegList.h" diff --git a/content/xul/templates/src/nsRuleNetwork.cpp b/content/xul/templates/src/nsRuleNetwork.cpp index 526df564316..7e1b5403e08 100644 --- a/content/xul/templates/src/nsRuleNetwork.cpp +++ b/content/xul/templates/src/nsRuleNetwork.cpp @@ -16,8 +16,6 @@ */ -#include "mozilla/Util.h" - #include "nscore.h" #include "nsCOMPtr.h" #include "plhash.h" diff --git a/dom/audiochannel/AudioChannelService.cpp b/dom/audiochannel/AudioChannelService.cpp index 069e9a8cfd7..cba41aeadc2 100644 --- a/dom/audiochannel/AudioChannelService.cpp +++ b/dom/audiochannel/AudioChannelService.cpp @@ -12,7 +12,6 @@ #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "mozilla/dom/ContentParent.h" diff --git a/dom/audiochannel/AudioChannelServiceChild.cpp b/dom/audiochannel/AudioChannelServiceChild.cpp index d2e4429c1d5..023eec896e2 100644 --- a/dom/audiochannel/AudioChannelServiceChild.cpp +++ b/dom/audiochannel/AudioChannelServiceChild.cpp @@ -11,7 +11,6 @@ #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "mozilla/dom/ContentChild.h" #include "mozilla/dom/ContentParent.h" #include "nsIObserverService.h" diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index b7e414e2b08..17562817597 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -9,7 +9,6 @@ #include #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" // Local Includes #include "Navigator.h" diff --git a/dom/bindings/CallbackObject.h b/dom/bindings/CallbackObject.h index a04763817a8..85428678419 100644 --- a/dom/bindings/CallbackObject.h +++ b/dom/bindings/CallbackObject.h @@ -24,7 +24,6 @@ #include "mozilla/Assertions.h" #include "mozilla/ErrorResult.h" #include "mozilla/HoldDropJSObjects.h" -#include "mozilla/Util.h" #include "nsContentUtils.h" #include "nsCxPusher.h" #include "nsWrapperCache.h" diff --git a/dom/bindings/DOMJSProxyHandler.cpp b/dom/bindings/DOMJSProxyHandler.cpp index ca4189f069d..4bb115fbe1e 100644 --- a/dom/bindings/DOMJSProxyHandler.cpp +++ b/dom/bindings/DOMJSProxyHandler.cpp @@ -4,8 +4,6 @@ * 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 "mozilla/Util.h" - #include "mozilla/dom/DOMJSProxyHandler.h" #include "xpcpublic.h" #include "xpcprivate.h" diff --git a/dom/bindings/TypedArray.h b/dom/bindings/TypedArray.h index f84435a4e10..d8ed5008533 100644 --- a/dom/bindings/TypedArray.h +++ b/dom/bindings/TypedArray.h @@ -13,7 +13,6 @@ #include "js/Tracer.h" #include "mozilla/Attributes.h" #include "mozilla/dom/BindingDeclarations.h" -#include "mozilla/Util.h" // for Maybe #include "nsWrapperCache.h" namespace mozilla { diff --git a/dom/bluetooth/BluetoothAdapter.cpp b/dom/bluetooth/BluetoothAdapter.cpp index 0b3ec6c2755..8859776e855 100644 --- a/dom/bluetooth/BluetoothAdapter.cpp +++ b/dom/bluetooth/BluetoothAdapter.cpp @@ -19,7 +19,6 @@ #include "mozilla/dom/BluetoothAdapterBinding.h" #include "mozilla/dom/ContentChild.h" #include "mozilla/LazyIdleThread.h" -#include "mozilla/Util.h" #include "BluetoothAdapter.h" #include "BluetoothDevice.h" diff --git a/dom/bluetooth/BluetoothManager.cpp b/dom/bluetooth/BluetoothManager.cpp index a4e432f3e94..922c64f853f 100644 --- a/dom/bluetooth/BluetoothManager.cpp +++ b/dom/bluetooth/BluetoothManager.cpp @@ -16,7 +16,6 @@ #include "nsDOMClassInfo.h" #include "nsIPermissionManager.h" #include "nsThreadUtils.h" -#include "mozilla/Util.h" #include "mozilla/dom/bluetooth/BluetoothTypes.h" #include "mozilla/dom/BluetoothManagerBinding.h" diff --git a/dom/bluetooth/BluetoothService.cpp b/dom/bluetooth/BluetoothService.cpp index dac0fdb3499..36fe27219a2 100644 --- a/dom/bluetooth/BluetoothService.cpp +++ b/dom/bluetooth/BluetoothService.cpp @@ -23,7 +23,6 @@ #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "mozilla/dom/ContentParent.h" #include "mozilla/dom/bluetooth/BluetoothTypes.h" #include "mozilla/ipc/UnixSocket.h" diff --git a/dom/bluetooth/ipc/BluetoothParent.cpp b/dom/bluetooth/ipc/BluetoothParent.cpp index 057e2a678a2..2c9cc88d76f 100644 --- a/dom/bluetooth/ipc/BluetoothParent.cpp +++ b/dom/bluetooth/ipc/BluetoothParent.cpp @@ -10,7 +10,6 @@ #include "mozilla/Assertions.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "nsDebug.h" #include "nsThreadUtils.h" #include "nsTraceRefcnt.h" diff --git a/dom/indexedDB/IndexedDatabaseManager.cpp b/dom/indexedDB/IndexedDatabaseManager.cpp index 90cf8514408..d52ab010be1 100644 --- a/dom/indexedDB/IndexedDatabaseManager.cpp +++ b/dom/indexedDB/IndexedDatabaseManager.cpp @@ -23,7 +23,6 @@ #include "mozilla/dom/TabContext.h" #include "mozilla/Services.h" #include "mozilla/storage.h" -#include "mozilla/Util.h" #include "nsContentUtils.h" #include "nsEventDispatcher.h" #include "nsThreadUtils.h" diff --git a/dom/indexedDB/ipc/IndexedDBParent.cpp b/dom/indexedDB/ipc/IndexedDBParent.cpp index 0242472f4f6..ca23d65f302 100644 --- a/dom/indexedDB/ipc/IndexedDBParent.cpp +++ b/dom/indexedDB/ipc/IndexedDBParent.cpp @@ -17,7 +17,6 @@ #include "mozilla/dom/ipc/Blob.h" #include "mozilla/dom/TabParent.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "nsCxPusher.h" #include "AsyncConnectionHelper.h" diff --git a/dom/speakermanager/SpeakerManagerService.cpp b/dom/speakermanager/SpeakerManagerService.cpp index c3101592a71..635f95bec37 100644 --- a/dom/speakermanager/SpeakerManagerService.cpp +++ b/dom/speakermanager/SpeakerManagerService.cpp @@ -9,7 +9,6 @@ #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "mozilla/dom/ContentParent.h" #include "nsIPropertyBag2.h" #include "nsThreadUtils.h" diff --git a/dom/speakermanager/SpeakerManagerServiceChild.cpp b/dom/speakermanager/SpeakerManagerServiceChild.cpp index bafb4ffd669..988c03e1288 100644 --- a/dom/speakermanager/SpeakerManagerServiceChild.cpp +++ b/dom/speakermanager/SpeakerManagerServiceChild.cpp @@ -8,7 +8,6 @@ #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "mozilla/dom/ContentChild.h" #include "mozilla/dom/ContentParent.h" #include "nsIObserverService.h" diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index e499c2af0db..793475214b3 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -44,7 +44,6 @@ #include "mozilla/dom/MessagePortList.h" #include "mozilla/dom/WorkerBinding.h" #include "mozilla/Preferences.h" -#include "mozilla/Util.h" #include "nsAlgorithm.h" #include "nsContentUtils.h" #include "nsCxPusher.h" diff --git a/editor/libeditor/html/nsEditProperty.cpp b/editor/libeditor/html/nsEditProperty.cpp index 0af7f3e70e0..f92a74ba091 100644 --- a/editor/libeditor/html/nsEditProperty.cpp +++ b/editor/libeditor/html/nsEditProperty.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "nsMemory.h" #include "nsStaticAtom.h" #include "nsEditProperty.h" diff --git a/gfx/2d/Blur.cpp b/gfx/2d/Blur.cpp index b183cf7fd4b..dd18e395a98 100644 --- a/gfx/2d/Blur.cpp +++ b/gfx/2d/Blur.cpp @@ -12,7 +12,6 @@ #include "mozilla/CheckedInt.h" #include "mozilla/Constants.h" -#include "mozilla/Util.h" #include "2D.h" #include "Tools.h" diff --git a/gfx/gl/GLLibraryLoader.h b/gfx/gl/GLLibraryLoader.h index 00d5a794eda..0d18a1428d4 100644 --- a/gfx/gl/GLLibraryLoader.h +++ b/gfx/gl/GLLibraryLoader.h @@ -12,7 +12,6 @@ #endif #include "GLDefs.h" -#include "mozilla/Util.h" #include "nscore.h" #include "prlink.h" diff --git a/gfx/ipc/GfxMessageUtils.h b/gfx/ipc/GfxMessageUtils.h index ed42a627619..9cdd4c008a2 100644 --- a/gfx/ipc/GfxMessageUtils.h +++ b/gfx/ipc/GfxMessageUtils.h @@ -11,7 +11,6 @@ #include "chrome/common/ipc_message_utils.h" #include "ipc/IPCMessageUtils.h" -#include "mozilla/Util.h" #include #include "gfx3DMatrix.h" diff --git a/gfx/layers/LayerScope.cpp b/gfx/layers/LayerScope.cpp index 6ebeae9a053..ca3f3217231 100644 --- a/gfx/layers/LayerScope.cpp +++ b/gfx/layers/LayerScope.cpp @@ -6,8 +6,6 @@ /* This must occur *after* layers/PLayers.h to avoid typedefs conflicts. */ #include "LayerScope.h" -#include "mozilla/Util.h" - #include "Composer2D.h" #include "Effects.h" #include "mozilla/TimeStamp.h" diff --git a/gfx/thebes/gfxPangoFonts.cpp b/gfx/thebes/gfxPangoFonts.cpp index 94820f132f4..6573d913fb5 100644 --- a/gfx/thebes/gfxPangoFonts.cpp +++ b/gfx/thebes/gfxPangoFonts.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "prlink.h" #include "gfxTypes.h" diff --git a/hal/Hal.cpp b/hal/Hal.cpp index 1673b450969..4532ac79b96 100644 --- a/hal/Hal.cpp +++ b/hal/Hal.cpp @@ -7,7 +7,6 @@ #include "Hal.h" #include "HalImpl.h" #include "HalSandbox.h" -#include "mozilla/Util.h" #include "nsThreadUtils.h" #include "nsXULAppAPI.h" #include "mozilla/Observer.h" diff --git a/image/src/SurfaceCache.cpp b/image/src/SurfaceCache.cpp index d450d32326c..9ca996fe0e2 100644 --- a/image/src/SurfaceCache.cpp +++ b/image/src/SurfaceCache.cpp @@ -15,7 +15,6 @@ #include "mozilla/Preferences.h" #include "mozilla/RefPtr.h" #include "mozilla/StaticPtr.h" -#include "mozilla/Util.h" // for Maybe #include "gfxASurface.h" #include "gfxPattern.h" // Workaround for flaw in bug 921753 part 2. #include "gfxDrawable.h" diff --git a/ipc/dbus/DBusThread.cpp b/ipc/dbus/DBusThread.cpp index 86f32ba761c..346815ad5da 100644 --- a/ipc/dbus/DBusThread.cpp +++ b/ipc/dbus/DBusThread.cpp @@ -50,7 +50,6 @@ #include "mozilla/NullPtr.h" #include "mozilla/StaticPtr.h" #include "mozilla/Monitor.h" -#include "mozilla/Util.h" #include "mozilla/FileUtils.h" #include "nsThreadUtils.h" #include "nsIThread.h" diff --git a/ipc/unixsocket/UnixSocket.cpp b/ipc/unixsocket/UnixSocket.cpp index f352c18a110..9a67b03f203 100644 --- a/ipc/unixsocket/UnixSocket.cpp +++ b/ipc/unixsocket/UnixSocket.cpp @@ -17,7 +17,6 @@ #include "base/message_loop.h" #include "mozilla/Monitor.h" -#include "mozilla/Util.h" #include "mozilla/FileUtils.h" #include "nsString.h" #include "nsThreadUtils.h" diff --git a/js/src/gc/Zone.h b/js/src/gc/Zone.h index e14eea16276..ebad06d0b6c 100644 --- a/js/src/gc/Zone.h +++ b/js/src/gc/Zone.h @@ -9,7 +9,6 @@ #include "mozilla/Atomics.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "jscntxt.h" #include "jsgc.h" diff --git a/js/src/jsopcode.cpp b/js/src/jsopcode.cpp index 14c6432f859..7c5a8151901 100644 --- a/js/src/jsopcode.cpp +++ b/js/src/jsopcode.cpp @@ -10,8 +10,6 @@ #include "jsopcodeinlines.h" -#include "mozilla/Util.h" - #include #include #include @@ -49,7 +47,6 @@ using namespace js; using namespace js::gc; using js::frontend::IsIdentifier; -using mozilla::ArrayLength; /* * Index limit must stay within 32 bits. diff --git a/js/xpconnect/shell/xpcshell.cpp b/js/xpconnect/shell/xpcshell.cpp index 1fac33fe90b..31effe323cb 100644 --- a/js/xpconnect/shell/xpcshell.cpp +++ b/js/xpconnect/shell/xpcshell.cpp @@ -9,7 +9,6 @@ #include -#include "mozilla/Util.h" #include "mozilla/WindowsDllBlocklist.h" #include "nsXULAppAPI.h" diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index 81fb1809730..cb43fa26c53 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -81,7 +81,6 @@ #include "mozilla/CycleCollectedJSRuntime.h" #include "mozilla/GuardObjects.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include #include diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 7bd33bf3774..4a59b02484f 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -12,7 +12,6 @@ #include "nsBlockFrame.h" #include "mozilla/DebugOnly.h" -#include "mozilla/Util.h" #include "nsCOMPtr.h" #include "nsAbsoluteContainingBlock.h" diff --git a/layout/generic/nsLineLayout.cpp b/layout/generic/nsLineLayout.cpp index 448fcea83cc..630e5b738e0 100644 --- a/layout/generic/nsLineLayout.cpp +++ b/layout/generic/nsLineLayout.cpp @@ -10,7 +10,6 @@ #define PL_ARENA_CONST_ALIGN_MASK (sizeof(void*)-1) #include "nsLineLayout.h" -#include "mozilla/Util.h" #include "nsBlockFrame.h" #include "nsStyleConsts.h" #include "nsContainerFrame.h" diff --git a/layout/inspector/inDOMView.cpp b/layout/inspector/inDOMView.cpp index f8bc32bbbe6..26c19d7f861 100644 --- a/layout/inspector/inDOMView.cpp +++ b/layout/inspector/inDOMView.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "inDOMView.h" #include "inIDOMUtils.h" diff --git a/layout/style/nsCSSScanner.cpp b/layout/style/nsCSSScanner.cpp index 35c369d60e6..f11ca5d18ee 100644 --- a/layout/style/nsCSSScanner.cpp +++ b/layout/style/nsCSSScanner.cpp @@ -14,8 +14,6 @@ #include "mozilla/Util.h" #include -using mozilla::ArrayLength; - /* Character class tables and related helper functions. */ static const uint8_t IS_HEX_DIGIT = 0x01; diff --git a/memory/mozalloc/throw_gcc.h b/memory/mozalloc/throw_gcc.h index 65a96abec36..2c04dd24343 100644 --- a/memory/mozalloc/throw_gcc.h +++ b/memory/mozalloc/throw_gcc.h @@ -9,7 +9,6 @@ #define mozilla_throw_gcc_h #include "mozilla/Attributes.h" -#include "mozilla/Util.h" #include // snprintf #include // strerror diff --git a/mfbt/BloomFilter.h b/mfbt/BloomFilter.h index afe4b72b809..8129c489d4c 100644 --- a/mfbt/BloomFilter.h +++ b/mfbt/BloomFilter.h @@ -16,7 +16,6 @@ #include "mozilla/Assertions.h" #include "mozilla/Likely.h" -#include "mozilla/Util.h" #include #include diff --git a/parser/html/nsHtml5Atoms.cpp b/parser/html/nsHtml5Atoms.cpp index 108e393ecbb..ae8136179da 100644 --- a/parser/html/nsHtml5Atoms.cpp +++ b/parser/html/nsHtml5Atoms.cpp @@ -10,8 +10,6 @@ * unloaded. */ -#include "mozilla/Util.h" - #include "nsHtml5Atoms.h" #include "nsStaticAtom.h" diff --git a/parser/htmlparser/src/CNavDTD.cpp b/parser/htmlparser/src/CNavDTD.cpp index 8657b6aa0f2..652e7a7bb80 100644 --- a/parser/htmlparser/src/CNavDTD.cpp +++ b/parser/htmlparser/src/CNavDTD.cpp @@ -4,8 +4,6 @@ * 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 "mozilla/Util.h" - #include "nsISupports.h" #include "nsISupportsImpl.h" #include "nsIParser.h" diff --git a/parser/htmlparser/src/nsHTMLTags.cpp b/parser/htmlparser/src/nsHTMLTags.cpp index 2d437bfca0e..b51fecb93b5 100644 --- a/parser/htmlparser/src/nsHTMLTags.cpp +++ b/parser/htmlparser/src/nsHTMLTags.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "nsHTMLTags.h" #include "nsCRT.h" #include "nsReadableUtils.h" diff --git a/rdf/base/src/nsRDFContentSink.cpp b/rdf/base/src/nsRDFContentSink.cpp index 6fcbc36c5b9..dcd8623eac2 100644 --- a/rdf/base/src/nsRDFContentSink.cpp +++ b/rdf/base/src/nsRDFContentSink.cpp @@ -38,8 +38,6 @@ */ -#include "mozilla/Util.h" - #include "nsCOMPtr.h" #include "nsInterfaceHashtable.h" #include "nsIContentSink.h" diff --git a/storage/src/TelemetryVFS.cpp b/storage/src/TelemetryVFS.cpp index bcdacd7cee1..423788c9052 100644 --- a/storage/src/TelemetryVFS.cpp +++ b/storage/src/TelemetryVFS.cpp @@ -9,7 +9,6 @@ #include "mozilla/Preferences.h" #include "sqlite3.h" #include "nsThreadUtils.h" -#include "mozilla/Util.h" #include "mozilla/dom/quota/PersistenceType.h" #include "mozilla/dom/quota/QuotaManager.h" #include "mozilla/dom/quota/QuotaObject.h" diff --git a/storage/src/mozStorageStatementData.h b/storage/src/mozStorageStatementData.h index 2e611cd3c1e..727c473b337 100644 --- a/storage/src/mozStorageStatementData.h +++ b/storage/src/mozStorageStatementData.h @@ -12,7 +12,6 @@ #include "nsAutoPtr.h" #include "nsTArray.h" #include "nsIEventTarget.h" -#include "mozilla/Util.h" #include "MainThreadUtils.h" #include "mozStorageBindingParamsArray.h" diff --git a/toolkit/components/places/nsNavBookmarks.cpp b/toolkit/components/places/nsNavBookmarks.cpp index 1879a078160..64460a51104 100644 --- a/toolkit/components/places/nsNavBookmarks.cpp +++ b/toolkit/components/places/nsNavBookmarks.cpp @@ -16,7 +16,6 @@ #include "nsPrintfCString.h" #include "prprf.h" #include "mozilla/storage.h" -#include "mozilla/Util.h" #include "GeckoProfiler.h" diff --git a/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp b/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp index c268e91a8b7..792893a2bd9 100644 --- a/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp +++ b/toolkit/system/androidproxy/nsAndroidSystemProxySettings.cpp @@ -6,7 +6,6 @@ #include "nsNetUtil.h" #include "nsIURI.h" -#include "mozilla/Util.h" #include "nsISystemProxySettings.h" #include "nsIServiceManager.h" #include "mozilla/ModuleUtils.h" diff --git a/tools/profiler/GeckoProfilerImpl.h b/tools/profiler/GeckoProfilerImpl.h index 727907ac9c4..e84eb3cc4c8 100644 --- a/tools/profiler/GeckoProfilerImpl.h +++ b/tools/profiler/GeckoProfilerImpl.h @@ -13,7 +13,6 @@ #include #include "mozilla/ThreadLocal.h" #include "mozilla/Assertions.h" -#include "mozilla/Util.h" #include "nsAlgorithm.h" #include "nscore.h" #include "GeckoProfilerFunc.h" diff --git a/tools/profiler/platform.h b/tools/profiler/platform.h index 53cdf3eec45..6ad0baadf3b 100644 --- a/tools/profiler/platform.h +++ b/tools/profiler/platform.h @@ -40,7 +40,6 @@ #endif #include -#include "mozilla/Util.h" #include "mozilla/unused.h" #include "mozilla/TimeStamp.h" #include "mozilla/Mutex.h" diff --git a/widget/android/AndroidBridge.cpp b/widget/android/AndroidBridge.cpp index 7322006f529..7c39a14da86 100644 --- a/widget/android/AndroidBridge.cpp +++ b/widget/android/AndroidBridge.cpp @@ -3,7 +3,6 @@ * 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 "mozilla/Util.h" #include "mozilla/layers/CompositorChild.h" #include "mozilla/layers/CompositorParent.h" diff --git a/widget/android/AndroidJNIWrapper.cpp b/widget/android/AndroidJNIWrapper.cpp index 9c9c825bb65..67e46717009 100644 --- a/widget/android/AndroidJNIWrapper.cpp +++ b/widget/android/AndroidJNIWrapper.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include #include #include diff --git a/widget/gonk/libdisplay/BootAnimation.cpp b/widget/gonk/libdisplay/BootAnimation.cpp index 54b550a3d50..a30175a4bdb 100644 --- a/widget/gonk/libdisplay/BootAnimation.cpp +++ b/widget/gonk/libdisplay/BootAnimation.cpp @@ -22,7 +22,6 @@ #include #include "mozilla/FileUtils.h" #include "mozilla/NullPtr.h" -#include "mozilla/Util.h" #include "png.h" #include "android/log.h" diff --git a/widget/gtk/nsColorPicker.cpp b/widget/gtk/nsColorPicker.cpp index 320addd8625..432e1089e25 100644 --- a/widget/gtk/nsColorPicker.cpp +++ b/widget/gtk/nsColorPicker.cpp @@ -5,7 +5,6 @@ #include -#include "mozilla/Util.h" #include "nsColor.h" #include "nsColorPicker.h" #include "nsGtkUtils.h" diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp index afd7e00dd5e..149d877beed 100644 --- a/widget/gtk/nsFilePicker.cpp +++ b/widget/gtk/nsFilePicker.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/Types.h" #include diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index ce319a62764..6c350011bad 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -58,7 +58,6 @@ #include "mozilla/MiscEvents.h" #include "mozilla/MouseEvents.h" #include "mozilla/TouchEvents.h" -#include "mozilla/Util.h" #include "mozilla/ipc/MessageChannel.h" #include diff --git a/xpcom/tests/MoreTestingAtoms.cpp b/xpcom/tests/MoreTestingAtoms.cpp index c64a14cbacc..09433cd187e 100644 --- a/xpcom/tests/MoreTestingAtoms.cpp +++ b/xpcom/tests/MoreTestingAtoms.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "MoreTestingAtoms.h" #include "nsStaticAtom.h" #include "nsMemory.h" diff --git a/xpcom/tests/TestingAtoms.cpp b/xpcom/tests/TestingAtoms.cpp index f03cf658e59..f1521d9ab70 100644 --- a/xpcom/tests/TestingAtoms.cpp +++ b/xpcom/tests/TestingAtoms.cpp @@ -3,8 +3,6 @@ * 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 "mozilla/Util.h" - #include "TestingAtoms.h" #include "nsStaticAtom.h" #include "nsMemory.h" From 759ab69b0a37600402989b997664d9c1c37b4bd2 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sun, 8 Dec 2013 21:52:54 -0500 Subject: [PATCH 16/25] Bug 713082 - Part 2: Rename Util.h to ArrayUtils.h. r=Waldo --HG-- rename : mfbt/Util.h => mfbt/ArrayUtils.h --- accessible/src/atk/AccessibleWrap.cpp | 2 +- accessible/src/base/nsAccessibilityService.cpp | 2 +- accessible/src/generic/RootAccessible.cpp | 2 +- .../components/shell/src/nsGNOMEShellService.cpp | 2 +- caps/src/nsNullPrincipal.cpp | 2 +- caps/src/nsScriptSecurityManager.cpp | 2 +- content/base/src/EventSource.cpp | 2 +- content/base/src/FragmentOrElement.cpp | 2 +- content/base/src/nsContentUtils.cpp | 2 +- content/base/src/nsDocument.cpp | 2 +- content/base/src/nsNodeInfo.cpp | 2 +- content/base/src/nsTreeSanitizer.cpp | 2 +- content/base/src/nsXMLHttpRequest.cpp | 2 +- content/events/src/nsDOMDataTransfer.cpp | 2 +- content/events/src/nsDOMUIEvent.cpp | 2 +- content/html/content/src/HTMLInputElement.cpp | 2 +- content/html/content/src/HTMLMediaElement.cpp | 2 +- content/html/content/src/nsGenericHTMLElement.cpp | 2 +- content/html/document/src/nsHTMLContentSink.cpp | 2 +- content/mathml/content/src/nsMathMLElement.cpp | 2 +- content/media/wave/WaveReader.cpp | 2 +- .../webaudio/blink/IRC_Composite_C_R0195-incl.cpp | 2 +- .../content/src/SVGAnimatedPreserveAspectRatio.cpp | 2 +- content/svg/content/src/SVGClipPathElement.cpp | 2 +- content/svg/content/src/SVGFilterElement.cpp | 2 +- content/svg/content/src/SVGForeignObjectElement.cpp | 2 +- content/svg/content/src/SVGGradientElement.cpp | 2 +- content/svg/content/src/SVGImageElement.cpp | 2 +- content/svg/content/src/SVGLength.cpp | 2 +- content/svg/content/src/SVGMPathElement.cpp | 2 +- content/svg/content/src/SVGMarkerElement.cpp | 2 +- content/svg/content/src/SVGMaskElement.cpp | 2 +- content/svg/content/src/SVGNumberList.cpp | 2 +- content/svg/content/src/SVGPathSegUtils.cpp | 3 ++- content/svg/content/src/SVGPatternElement.cpp | 2 +- content/svg/content/src/SVGPointList.cpp | 2 +- content/svg/content/src/SVGSVGElement.cpp | 2 +- .../svg/content/src/SVGTextPositioningElement.cpp | 2 +- content/svg/content/src/SVGTransformListParser.cpp | 2 +- content/svg/content/src/SVGUseElement.cpp | 2 +- content/svg/content/src/nsSVGAngle.cpp | 2 +- content/svg/content/src/nsSVGElement.cpp | 2 +- content/svg/content/src/nsSVGFilters.cpp | 2 +- content/svg/content/src/nsSVGLength2.cpp | 2 +- content/xbl/src/nsXBLContentSink.cpp | 2 +- content/xbl/src/nsXBLPrototypeBinding.cpp | 2 +- content/xbl/src/nsXBLPrototypeHandler.cpp | 2 +- content/xbl/src/nsXBLService.cpp | 2 +- content/xslt/src/xpath/txCoreFunctionCall.cpp | 2 +- content/xslt/src/xslt/txEXSLTFunctions.cpp | 2 +- .../xslt/src/xslt/txStylesheetCompileHandlers.cpp | 2 +- content/xslt/src/xslt/txStylesheetCompiler.cpp | 2 +- content/xul/document/src/XULDocument.cpp | 2 +- content/xul/templates/src/nsXULContentBuilder.cpp | 2 +- content/xul/templates/src/nsXULContentUtils.cpp | 2 +- docshell/base/nsDocShell.cpp | 2 +- dom/base/DOMException.cpp | 2 +- dom/base/nsDOMClassInfo.cpp | 2 +- dom/base/nsGlobalWindowCommands.cpp | 2 +- dom/bindings/BindingUtils.h | 2 +- dom/bluetooth/bluez/linux/BluetoothDBusService.cpp | 2 +- dom/encoding/EncodingUtils.cpp | 2 +- dom/plugins/base/nsNPAPIPlugin.cpp | 2 +- dom/plugins/base/nsPluginsDirWin.cpp | 2 +- dom/plugins/ipc/PluginInstanceChild.cpp | 2 +- dom/plugins/ipc/PluginModuleChild.cpp | 2 +- dom/workers/RuntimeService.cpp | 2 +- editor/libeditor/html/nsHTMLDataTransfer.cpp | 2 +- editor/libeditor/html/nsHTMLEditUtils.cpp | 2 +- editor/libeditor/text/nsPlaintextDataTransfer.cpp | 2 +- .../webbrowserpersist/src/nsWebBrowserPersist.cpp | 2 +- extensions/auth/nsAuthGSSAPI.cpp | 2 +- .../src/base/nsCodingStateMachine.h | 3 ++- gfx/gl/GLContextProviderEGL.cpp | 3 ++- gfx/layers/RotatedBuffer.cpp | 2 +- gfx/layers/client/ContentClient.cpp | 2 +- gfx/layers/d3d10/ThebesLayerD3D10.cpp | 2 +- gfx/layers/d3d9/ThebesLayerD3D9.cpp | 2 +- gfx/layers/opengl/CompositorOGL.cpp | 2 +- gfx/src/nsColor.cpp | 7 +++---- gfx/tests/gtest/TestColorNames.cpp | 2 +- gfx/tests/gtest/gfxTextRunPerfTest.cpp | 2 +- gfx/thebes/gfxCoreTextShaper.cpp | 2 +- gfx/thebes/gfxDWriteFontList.cpp | 2 +- gfx/thebes/gfxFT2FontList.cpp | 2 +- gfx/thebes/gfxFontUtils.cpp | 2 +- gfx/thebes/gfxFontconfigUtils.cpp | 2 +- gfx/thebes/gfxWindowsPlatform.cpp | 2 +- hal/linux/udev.h | 2 +- image/decoders/icon/nsIconURI.cpp | 2 +- image/decoders/icon/win/nsIconChannel.cpp | 2 +- intl/locale/src/nsCharsetAlias.cpp | 2 +- intl/locale/src/os2/nsOS2Charset.cpp | 2 +- intl/locale/src/unix/nsUNIXCharset.cpp | 2 +- intl/locale/src/windows/nsWin32Locale.cpp | 2 +- intl/locale/src/windows/nsWinCharset.cpp | 2 +- intl/unicharutil/util/nsSpecialCasingData.cpp | 2 +- intl/unicharutil/util/nsUnicodeProperties.cpp | 2 +- ipc/glue/IPCMessageUtils.h | 2 +- ipc/glue/URIUtils.cpp | 2 +- ipc/testshell/TestShellParent.cpp | 2 +- js/src/builtin/Object.cpp | 2 +- js/src/gc/RootMarking.cpp | 2 +- js/src/jit/arm/Assembler-arm.h | 2 +- js/src/jit/x64/Assembler-x64.h | 2 +- js/src/jit/x86/Assembler-x86.h | 2 +- js/src/jsapi-tests/testExternalStrings.cpp | 2 +- js/src/jsarray.cpp | 2 +- js/src/jsatom.cpp | 2 +- js/src/jscntxt.cpp | 2 +- js/src/jsdate.cpp | 2 +- js/src/jsexn.cpp | 2 +- js/src/jsfun.cpp | 2 +- js/src/jsgc.cpp | 2 +- js/src/jsiter.cpp | 2 +- js/src/jsobj.cpp | 2 +- js/src/jsreflect.cpp | 2 +- js/src/shell/js.cpp | 2 +- js/src/vm/Runtime.cpp | 2 +- js/xpconnect/src/XPCConvert.cpp | 2 +- layout/base/nsLayoutUtils.cpp | 2 +- layout/base/nsPresShell.cpp | 2 +- layout/base/nsRefreshDriver.cpp | 2 +- layout/generic/MathVariantTextRunFactory.cpp | 4 +++- layout/generic/TextOverflow.cpp | 2 +- layout/style/Declaration.cpp | 2 +- layout/style/Loader.cpp | 2 +- layout/style/nsCSSAnonBoxes.cpp | 2 +- layout/style/nsCSSPropertySet.h | 2 +- layout/style/nsCSSProps.cpp | 2 +- layout/style/nsCSSPseudoClasses.cpp | 2 +- layout/style/nsCSSPseudoElements.cpp | 2 +- layout/style/nsCSSRuleProcessor.cpp | 2 +- layout/style/nsCSSScanner.cpp | 2 +- layout/style/nsComputedDOMStyle.cpp | 2 +- layout/style/nsRuleNode.cpp | 2 +- layout/style/nsStyleAnimation.cpp | 2 +- layout/style/nsStyleSet.cpp | 2 +- .../signaling/src/sipcc/core/includes/ccapi.h | 2 +- mfbt/{Util.h => ArrayUtils.h} | 13 ++++++------- mfbt/PodOperations.h | 3 ++- mfbt/RangedPtr.h | 4 +++- mfbt/STYLE | 3 +-- mfbt/Vector.h | 2 +- mfbt/common.mozbuild | 2 +- mfbt/decimal/moz-decimal-utils.h | 2 +- modules/libpref/src/Preferences.cpp | 2 +- netwerk/base/src/nsProtocolProxyService.cpp | 2 +- netwerk/cache/nsCacheService.cpp | 2 +- netwerk/cache/nsDiskCacheDeviceSQL.cpp | 2 +- netwerk/dns/nsEffectiveTLDService.cpp | 2 +- netwerk/streamconv/converters/nsDirIndexParser.cpp | 2 +- netwerk/wifi/nsWifiAccessPoint.h | 2 +- parser/htmlparser/src/nsHTMLEntities.cpp | 2 +- .../unit/tlsserver/cmd/GenerateOCSPResponse.cpp | 3 ++- security/sandbox/linux/Sandbox.cpp | 2 +- storage/src/SQLCollations.cpp | 2 +- storage/src/mozStorageSQLFunctions.cpp | 2 +- toolkit/components/places/Database.cpp | 2 +- toolkit/components/places/History.cpp | 2 +- toolkit/components/places/nsAnnotationService.cpp | 2 +- toolkit/components/places/nsFaviconService.cpp | 2 +- toolkit/components/remote/nsXRemoteService.cpp | 2 +- toolkit/components/startup/nsUserInfoWin.cpp | 2 +- toolkit/crashreporter/nsExceptionHandler.cpp | 2 +- toolkit/identity/IdentityCryptoService.cpp | 2 +- toolkit/mozapps/update/tests/TestAUSReadStrings.cpp | 2 +- toolkit/profile/nsToolkitProfileService.cpp | 2 +- toolkit/system/gnome/nsGConfService.cpp | 2 +- toolkit/system/gnome/nsGSettingsService.cpp | 2 +- .../windowsproxy/nsWindowsSystemProxySettings.cpp | 2 +- toolkit/xre/nsAppRunner.cpp | 2 +- tools/profiler/JSCustomObjectBuilder.cpp | 2 +- tools/profiler/PseudoStack.h | 1 + uriloader/exthandler/nsExternalHelperAppService.cpp | 2 +- widget/cocoa/GfxInfo.mm | 2 +- widget/cocoa/TextInputHandler.mm | 2 +- widget/cocoa/nsChildView.mm | 2 +- widget/cocoa/nsPrintDialogX.mm | 2 +- widget/gtk/nsClipboard.cpp | 2 +- widget/gtk/nsGtkKeyUtils.cpp | 2 +- widget/gtk/nsNativeKeyBindings.cpp | 2 +- widget/gtk/nsPaperPS.cpp | 2 +- widget/gtk/nsPrintDialogGTK.cpp | 2 +- widget/gtk/nsWindow.cpp | 2 +- widget/qt/nsClipboard.cpp | 2 +- widget/qt/nsQtKeyUtils.cpp | 2 +- widget/qt/nsWindow.cpp | 2 +- widget/windows/GfxInfo.cpp | 2 +- widget/windows/KeyboardLayout.cpp | 2 +- widget/windows/TaskbarWindowPreview.cpp | 2 +- widget/windows/nsDataObj.cpp | 2 +- widget/windows/nsDeviceContextSpecWin.cpp | 2 +- widget/windows/nsUXThemeData.cpp | 2 +- widget/xpwidgets/GfxDriverInfo.h | 2 +- widget/xpwidgets/GfxInfoBase.cpp | 2 +- widget/xpwidgets/nsBaseWidget.cpp | 2 +- widget/xpwidgets/nsClipboardPrivacyHandler.cpp | 2 +- widget/xpwidgets/nsXPLookAndFeel.cpp | 2 +- xpcom/base/nsCycleCollector.cpp | 2 +- xpcom/base/nsStackWalk.cpp | 2 +- xpcom/base/nsSystemInfo.cpp | 2 +- xpcom/build/PoisonIOInterposerMac.cpp | 2 +- xpcom/components/ManifestParser.cpp | 2 +- xpcom/io/nsDirectoryService.cpp | 2 +- xpcom/io/nsLocalFileUnix.cpp | 2 +- xpcom/io/nsLocalFileWin.cpp | 2 +- xpcom/tests/TestAtoms.cpp | 2 +- xpcom/tests/TestDeadlockDetector.cpp | 2 +- xpcom/tests/TestHarness.h | 2 +- xpcom/tests/TestTArray.cpp | 2 +- xpcom/tests/TestUTF.cpp | 2 +- xpcom/threads/BackgroundHangMonitor.cpp | 1 + xpcom/threads/nsProcessCommon.cpp | 2 +- 214 files changed, 230 insertions(+), 222 deletions(-) rename mfbt/{Util.h => ArrayUtils.h} (89%) diff --git a/accessible/src/atk/AccessibleWrap.cpp b/accessible/src/atk/AccessibleWrap.cpp index 8de738ece68..639ebec8769 100644 --- a/accessible/src/atk/AccessibleWrap.cpp +++ b/accessible/src/atk/AccessibleWrap.cpp @@ -25,7 +25,7 @@ #include "States.h" #include "nsISimpleEnumerator.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsXPCOMStrings.h" #include "nsComponentManagerUtils.h" #include "nsIPersistentProperties2.h" diff --git a/accessible/src/base/nsAccessibilityService.cpp b/accessible/src/base/nsAccessibilityService.cpp index a22250a9414..2a14ed12647 100644 --- a/accessible/src/base/nsAccessibilityService.cpp +++ b/accessible/src/base/nsAccessibilityService.cpp @@ -63,9 +63,9 @@ #include "nsTreeUtils.h" #include "nsXBLPrototypeBinding.h" #include "nsXBLBinding.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Preferences.h" #include "mozilla/Services.h" -#include "mozilla/Util.h" #include "nsDeckFrame.h" #ifdef MOZ_XUL diff --git a/accessible/src/generic/RootAccessible.cpp b/accessible/src/generic/RootAccessible.cpp index d8df4e26040..e1425da23d1 100644 --- a/accessible/src/generic/RootAccessible.cpp +++ b/accessible/src/generic/RootAccessible.cpp @@ -5,7 +5,7 @@ #include "RootAccessible.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #define CreateEvent CreateEventA #include "nsIDOMDocument.h" diff --git a/browser/components/shell/src/nsGNOMEShellService.cpp b/browser/components/shell/src/nsGNOMEShellService.cpp index 901561fd6a1..8547bbb50e7 100644 --- a/browser/components/shell/src/nsGNOMEShellService.cpp +++ b/browser/components/shell/src/nsGNOMEShellService.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsGNOMEShellService.h" diff --git a/caps/src/nsNullPrincipal.cpp b/caps/src/nsNullPrincipal.cpp index 4c4191acbaf..9d67930f34b 100644 --- a/caps/src/nsNullPrincipal.cpp +++ b/caps/src/nsNullPrincipal.cpp @@ -9,7 +9,7 @@ * same-origin with anything but themselves. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsNullPrincipal.h" #include "nsNullPrincipalURI.h" diff --git a/caps/src/nsScriptSecurityManager.cpp b/caps/src/nsScriptSecurityManager.cpp index 42ed421344b..5ee37a85583 100644 --- a/caps/src/nsScriptSecurityManager.cpp +++ b/caps/src/nsScriptSecurityManager.cpp @@ -6,7 +6,7 @@ #include "nsScriptSecurityManager.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "js/OldDebugAPI.h" #include "xpcprivate.h" diff --git a/content/base/src/EventSource.cpp b/content/base/src/EventSource.cpp index a38a864a997..0464ddc610f 100644 --- a/content/base/src/EventSource.cpp +++ b/content/base/src/EventSource.cpp @@ -5,9 +5,9 @@ #include "mozilla/dom/EventSource.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" #include "mozilla/dom/EventSourceBinding.h" -#include "mozilla/Util.h" #include "js/OldDebugAPI.h" #include "nsNetUtil.h" diff --git a/content/base/src/FragmentOrElement.cpp b/content/base/src/FragmentOrElement.cpp index dbc582e9d1e..fc662723d1e 100644 --- a/content/base/src/FragmentOrElement.cpp +++ b/content/base/src/FragmentOrElement.cpp @@ -10,10 +10,10 @@ * utility methods for subclasses, and so forth. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/Likely.h" #include "mozilla/MemoryReporting.h" #include "mozilla/StaticPtr.h" -#include "mozilla/Util.h" #include "mozilla/dom/FragmentOrElement.h" diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index f21d9ee5703..99c402f7b08 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -28,6 +28,7 @@ // nsNPAPIPluginInstance must be included before nsIDocument.h, which is included in mozAutoDocUpdate.h. #include "nsNPAPIPluginInstance.h" #include "mozAutoDocUpdate.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" #include "mozilla/AutoRestore.h" #include "mozilla/Base64.h" @@ -45,7 +46,6 @@ #include "mozilla/Preferences.h" #include "mozilla/Selection.h" #include "mozilla/TextEvents.h" -#include "mozilla/Util.h" #include "nsAString.h" #include "nsAttrName.h" #include "nsAttrValue.h" diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index c76c8375d65..482008417ed 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -10,10 +10,10 @@ #include "nsDocument.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/AutoRestore.h" #include "mozilla/DebugOnly.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "mozilla/Likely.h" #include diff --git a/content/base/src/nsNodeInfo.cpp b/content/base/src/nsNodeInfo.cpp index 5fb7d562cf1..9b904567759 100644 --- a/content/base/src/nsNodeInfo.cpp +++ b/content/base/src/nsNodeInfo.cpp @@ -10,7 +10,7 @@ * prefix, namespace, and localName. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Likely.h" #include "nscore.h" diff --git a/content/base/src/nsTreeSanitizer.cpp b/content/base/src/nsTreeSanitizer.cpp index fe88ae2d0ed..6976c3a7144 100644 --- a/content/base/src/nsTreeSanitizer.cpp +++ b/content/base/src/nsTreeSanitizer.cpp @@ -4,7 +4,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsTreeSanitizer.h" #include "nsCSSParser.h" diff --git a/content/base/src/nsXMLHttpRequest.cpp b/content/base/src/nsXMLHttpRequest.cpp index 070572740e0..a043694a1c6 100644 --- a/content/base/src/nsXMLHttpRequest.cpp +++ b/content/base/src/nsXMLHttpRequest.cpp @@ -6,9 +6,9 @@ #include "nsXMLHttpRequest.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/XMLHttpRequestUploadBinding.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "nsDOMBlobBuilder.h" #include "nsIDOMDocument.h" #include "nsIDOMProgressEvent.h" diff --git a/content/events/src/nsDOMDataTransfer.cpp b/content/events/src/nsDOMDataTransfer.cpp index 0e7d2bb08ee..f114dba69b1 100644 --- a/content/events/src/nsDOMDataTransfer.cpp +++ b/content/events/src/nsDOMDataTransfer.cpp @@ -4,8 +4,8 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/BasicEvents.h" -#include "mozilla/Util.h" #include "nsDOMDataTransfer.h" diff --git a/content/events/src/nsDOMUIEvent.cpp b/content/events/src/nsDOMUIEvent.cpp index 5c46b0698db..59882d559b9 100644 --- a/content/events/src/nsDOMUIEvent.cpp +++ b/content/events/src/nsDOMUIEvent.cpp @@ -14,7 +14,7 @@ #include "nsContentUtils.h" #include "nsEventStateManager.h" #include "nsIFrame.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Assertions.h" #include "mozilla/ContentEvents.h" #include "mozilla/TextEvents.h" diff --git a/content/html/content/src/HTMLInputElement.cpp b/content/html/content/src/HTMLInputElement.cpp index 0f24ca77939..05a307be366 100644 --- a/content/html/content/src/HTMLInputElement.cpp +++ b/content/html/content/src/HTMLInputElement.cpp @@ -5,6 +5,7 @@ #include "mozilla/dom/HTMLInputElement.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" #include "mozilla/dom/Date.h" #include "nsAsyncDOMEvent.h" @@ -94,7 +95,6 @@ #include "nsTextEditorState.h" #include "mozilla/LookAndFeel.h" -#include "mozilla/Util.h" // DebugOnly #include "mozilla/Preferences.h" #include "mozilla/MathAlgorithms.h" diff --git a/content/html/content/src/HTMLMediaElement.cpp b/content/html/content/src/HTMLMediaElement.cpp index ffd45fd7717..92ca9b535e7 100644 --- a/content/html/content/src/HTMLMediaElement.cpp +++ b/content/html/content/src/HTMLMediaElement.cpp @@ -7,8 +7,8 @@ #include "mozilla/dom/HTMLMediaElement.h" #include "mozilla/dom/HTMLMediaElementBinding.h" #include "mozilla/dom/ElementInlines.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/MathAlgorithms.h" -#include "mozilla/Util.h" #include "base/basictypes.h" #include "nsIDOMHTMLMediaElement.h" diff --git a/content/html/content/src/nsGenericHTMLElement.cpp b/content/html/content/src/nsGenericHTMLElement.cpp index cf87b7beb32..1c85d8ae398 100644 --- a/content/html/content/src/nsGenericHTMLElement.cpp +++ b/content/html/content/src/nsGenericHTMLElement.cpp @@ -4,8 +4,8 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/MouseEvents.h" -#include "mozilla/Util.h" #include "mozilla/Likely.h" #include "nscore.h" diff --git a/content/html/document/src/nsHTMLContentSink.cpp b/content/html/document/src/nsHTMLContentSink.cpp index 6028c035ad3..bf047638090 100644 --- a/content/html/document/src/nsHTMLContentSink.cpp +++ b/content/html/document/src/nsHTMLContentSink.cpp @@ -10,7 +10,7 @@ * Don't bother adding new stuff in this file. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsContentSink.h" #include "nsCOMPtr.h" diff --git a/content/mathml/content/src/nsMathMLElement.cpp b/content/mathml/content/src/nsMathMLElement.cpp index a1c3bec8571..5176b794061 100644 --- a/content/mathml/content/src/nsMathMLElement.cpp +++ b/content/mathml/content/src/nsMathMLElement.cpp @@ -6,7 +6,7 @@ #include "nsMathMLElement.h" #include "base/compiler_specific.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsGkAtoms.h" #include "nsCRT.h" #include "nsRuleData.h" diff --git a/content/media/wave/WaveReader.cpp b/content/media/wave/WaveReader.cpp index 5de5f7b1ffb..74d1f7182a0 100644 --- a/content/media/wave/WaveReader.cpp +++ b/content/media/wave/WaveReader.cpp @@ -13,7 +13,7 @@ #include "nsISeekableStream.h" #include -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/CheckedInt.h" #include "mozilla/Endian.h" #include diff --git a/content/media/webaudio/blink/IRC_Composite_C_R0195-incl.cpp b/content/media/webaudio/blink/IRC_Composite_C_R0195-incl.cpp index 3fff3cf4757..9fe14f3d8c0 100644 --- a/content/media/webaudio/blink/IRC_Composite_C_R0195-incl.cpp +++ b/content/media/webaudio/blink/IRC_Composite_C_R0195-incl.cpp @@ -18,7 +18,7 @@ * the listener. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" using mozilla::ArrayLength; diff --git a/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp b/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp index e9fea8bd7c0..babca060053 100644 --- a/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp +++ b/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "SVGAnimatedPreserveAspectRatio.h" #include "mozilla/dom/SVGAnimatedPreserveAspectRatioBinding.h" diff --git a/content/svg/content/src/SVGClipPathElement.cpp b/content/svg/content/src/SVGClipPathElement.cpp index 6bbd696df93..afc7619997a 100644 --- a/content/svg/content/src/SVGClipPathElement.cpp +++ b/content/svg/content/src/SVGClipPathElement.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/SVGClipPathElement.h" #include "mozilla/dom/SVGClipPathElementBinding.h" diff --git a/content/svg/content/src/SVGFilterElement.cpp b/content/svg/content/src/SVGFilterElement.cpp index 5fad0563efc..79a1ba28bb2 100644 --- a/content/svg/content/src/SVGFilterElement.cpp +++ b/content/svg/content/src/SVGFilterElement.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsGkAtoms.h" #include "nsCOMPtr.h" diff --git a/content/svg/content/src/SVGForeignObjectElement.cpp b/content/svg/content/src/SVGForeignObjectElement.cpp index 197d4adf351..8d239a4c507 100644 --- a/content/svg/content/src/SVGForeignObjectElement.cpp +++ b/content/svg/content/src/SVGForeignObjectElement.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "mozilla/dom/SVGForeignObjectElement.h" diff --git a/content/svg/content/src/SVGGradientElement.cpp b/content/svg/content/src/SVGGradientElement.cpp index b2c04353460..406017eb451 100644 --- a/content/svg/content/src/SVGGradientElement.cpp +++ b/content/svg/content/src/SVGGradientElement.cpp @@ -5,10 +5,10 @@ #include "mozilla/dom/SVGGradientElement.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/SVGAnimatedTransformList.h" #include "mozilla/dom/SVGRadialGradientElementBinding.h" #include "mozilla/dom/SVGLinearGradientElementBinding.h" -#include "mozilla/Util.h" #include "nsCOMPtr.h" #include "nsGkAtoms.h" #include "nsSVGElement.h" diff --git a/content/svg/content/src/SVGImageElement.cpp b/content/svg/content/src/SVGImageElement.cpp index db44164da99..e469d227ddb 100644 --- a/content/svg/content/src/SVGImageElement.cpp +++ b/content/svg/content/src/SVGImageElement.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/SVGImageElement.h" #include "mozilla/gfx/2D.h" diff --git a/content/svg/content/src/SVGLength.cpp b/content/svg/content/src/SVGLength.cpp index fe4c566517a..2c4cc0ac2fd 100644 --- a/content/svg/content/src/SVGLength.cpp +++ b/content/svg/content/src/SVGLength.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "SVGLength.h" #include "nsSVGElement.h" diff --git a/content/svg/content/src/SVGMPathElement.cpp b/content/svg/content/src/SVGMPathElement.cpp index 4a1f1b18f27..f714a78e4d9 100644 --- a/content/svg/content/src/SVGMPathElement.cpp +++ b/content/svg/content/src/SVGMPathElement.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/SVGMPathElement.h" #include "nsDebug.h" diff --git a/content/svg/content/src/SVGMarkerElement.cpp b/content/svg/content/src/SVGMarkerElement.cpp index e358b823bd8..98c2f51f4d9 100644 --- a/content/svg/content/src/SVGMarkerElement.cpp +++ b/content/svg/content/src/SVGMarkerElement.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsGkAtoms.h" #include "nsCOMPtr.h" diff --git a/content/svg/content/src/SVGMaskElement.cpp b/content/svg/content/src/SVGMaskElement.cpp index a4444e081aa..f3b2eb7e0bd 100644 --- a/content/svg/content/src/SVGMaskElement.cpp +++ b/content/svg/content/src/SVGMaskElement.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsGkAtoms.h" diff --git a/content/svg/content/src/SVGNumberList.cpp b/content/svg/content/src/SVGNumberList.cpp index bf413716a31..1d8be3a3e44 100644 --- a/content/svg/content/src/SVGNumberList.cpp +++ b/content/svg/content/src/SVGNumberList.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "SVGNumberList.h" #include "nsCharSeparatedTokenizer.h" diff --git a/content/svg/content/src/SVGPathSegUtils.cpp b/content/svg/content/src/SVGPathSegUtils.cpp index 051acbc4815..d337e53e881 100644 --- a/content/svg/content/src/SVGPathSegUtils.cpp +++ b/content/svg/content/src/SVGPathSegUtils.cpp @@ -3,10 +3,11 @@ * 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 "mozilla/ArrayUtils.h" // MOZ_ARRAY_LENGTH + #include "SVGPathSegUtils.h" #include "gfx2DGlue.h" -#include "mozilla/Util.h" // MOZ_ARRAY_LENGTH #include "nsSVGPathDataParser.h" #include "nsTextFormatter.h" diff --git a/content/svg/content/src/SVGPatternElement.cpp b/content/svg/content/src/SVGPatternElement.cpp index 064f895a772..5289c7d6668 100644 --- a/content/svg/content/src/SVGPatternElement.cpp +++ b/content/svg/content/src/SVGPatternElement.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsGkAtoms.h" diff --git a/content/svg/content/src/SVGPointList.cpp b/content/svg/content/src/SVGPointList.cpp index 40519a79e23..e74994637f1 100644 --- a/content/svg/content/src/SVGPointList.cpp +++ b/content/svg/content/src/SVGPointList.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "SVGPointList.h" #include "nsCharSeparatedTokenizer.h" diff --git a/content/svg/content/src/SVGSVGElement.cpp b/content/svg/content/src/SVGSVGElement.cpp index 58bc0388d04..aa2e00c1be8 100644 --- a/content/svg/content/src/SVGSVGElement.cpp +++ b/content/svg/content/src/SVGSVGElement.cpp @@ -4,8 +4,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include +#include "mozilla/ArrayUtils.h" #include "mozilla/BasicEvents.h" -#include "mozilla/Util.h" #include "mozilla/Likely.h" #include "nsGkAtoms.h" diff --git a/content/svg/content/src/SVGTextPositioningElement.cpp b/content/svg/content/src/SVGTextPositioningElement.cpp index 1762ab503af..3765c0fb7b7 100644 --- a/content/svg/content/src/SVGTextPositioningElement.cpp +++ b/content/svg/content/src/SVGTextPositioningElement.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/SVGTextPositioningElement.h" #include "SVGAnimatedLengthList.h" diff --git a/content/svg/content/src/SVGTransformListParser.cpp b/content/svg/content/src/SVGTransformListParser.cpp index cbd9702b258..24cfd746a0b 100644 --- a/content/svg/content/src/SVGTransformListParser.cpp +++ b/content/svg/content/src/SVGTransformListParser.cpp @@ -4,7 +4,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "SVGTransformListParser.h" #include "SVGContentUtils.h" diff --git a/content/svg/content/src/SVGUseElement.cpp b/content/svg/content/src/SVGUseElement.cpp index 56b158d68cd..20ea5cd0cd1 100644 --- a/content/svg/content/src/SVGUseElement.cpp +++ b/content/svg/content/src/SVGUseElement.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/SVGUseElement.h" #include "mozilla/dom/SVGUseElementBinding.h" diff --git a/content/svg/content/src/nsSVGAngle.cpp b/content/svg/content/src/nsSVGAngle.cpp index adc9c2f8104..bac491c0079 100644 --- a/content/svg/content/src/nsSVGAngle.cpp +++ b/content/svg/content/src/nsSVGAngle.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsSVGAngle.h" #include "mozilla/dom/SVGMarkerElement.h" diff --git a/content/svg/content/src/nsSVGElement.cpp b/content/svg/content/src/nsSVGElement.cpp index 053c9987c12..2561edd73d8 100644 --- a/content/svg/content/src/nsSVGElement.cpp +++ b/content/svg/content/src/nsSVGElement.cpp @@ -3,8 +3,8 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" -#include "mozilla/Util.h" #include "nsSVGElement.h" diff --git a/content/svg/content/src/nsSVGFilters.cpp b/content/svg/content/src/nsSVGFilters.cpp index 6aaac6df0bc..33bd4021981 100644 --- a/content/svg/content/src/nsSVGFilters.cpp +++ b/content/svg/content/src/nsSVGFilters.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsSVGElement.h" #include "nsGkAtoms.h" diff --git a/content/svg/content/src/nsSVGLength2.cpp b/content/svg/content/src/nsSVGLength2.cpp index 9c69341cffc..ddfca89e7f8 100644 --- a/content/svg/content/src/nsSVGLength2.cpp +++ b/content/svg/content/src/nsSVGLength2.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsSVGLength2.h" #include "mozilla/dom/SVGAnimatedLength.h" diff --git a/content/xbl/src/nsXBLContentSink.cpp b/content/xbl/src/nsXBLContentSink.cpp index e6e5cc57c31..10b49451866 100644 --- a/content/xbl/src/nsXBLContentSink.cpp +++ b/content/xbl/src/nsXBLContentSink.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsXBLContentSink.h" #include "nsIDocument.h" diff --git a/content/xbl/src/nsXBLPrototypeBinding.cpp b/content/xbl/src/nsXBLPrototypeBinding.cpp index a6320a9d671..eb0e351ab59 100644 --- a/content/xbl/src/nsXBLPrototypeBinding.cpp +++ b/content/xbl/src/nsXBLPrototypeBinding.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsIAtom.h" diff --git a/content/xbl/src/nsXBLPrototypeHandler.cpp b/content/xbl/src/nsXBLPrototypeHandler.cpp index 995b96f21a2..a54a18bad5f 100644 --- a/content/xbl/src/nsXBLPrototypeHandler.cpp +++ b/content/xbl/src/nsXBLPrototypeHandler.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsXBLPrototypeHandler.h" diff --git a/content/xbl/src/nsXBLService.cpp b/content/xbl/src/nsXBLService.cpp index a79dfb00ddf..2f198c42f7a 100644 --- a/content/xbl/src/nsXBLService.cpp +++ b/content/xbl/src/nsXBLService.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsNetUtil.h" diff --git a/content/xslt/src/xpath/txCoreFunctionCall.cpp b/content/xslt/src/xpath/txCoreFunctionCall.cpp index 1e9681f35ea..23ffebe707b 100644 --- a/content/xslt/src/xpath/txCoreFunctionCall.cpp +++ b/content/xslt/src/xpath/txCoreFunctionCall.cpp @@ -3,8 +3,8 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/FloatingPoint.h" -#include "mozilla/Util.h" #include "txExpr.h" #include "nsAutoPtr.h" diff --git a/content/xslt/src/xslt/txEXSLTFunctions.cpp b/content/xslt/src/xslt/txEXSLTFunctions.cpp index d2ce23a14fd..dbc3c9cc01a 100644 --- a/content/xslt/src/xslt/txEXSLTFunctions.cpp +++ b/content/xslt/src/xslt/txEXSLTFunctions.cpp @@ -3,8 +3,8 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/FloatingPoint.h" -#include "mozilla/Util.h" #include "nsIAtom.h" #include "nsGkAtoms.h" diff --git a/content/xslt/src/xslt/txStylesheetCompileHandlers.cpp b/content/xslt/src/xslt/txStylesheetCompileHandlers.cpp index 5915c620b00..9e7e929dcb4 100644 --- a/content/xslt/src/xslt/txStylesheetCompileHandlers.cpp +++ b/content/xslt/src/xslt/txStylesheetCompileHandlers.cpp @@ -3,8 +3,8 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/FloatingPoint.h" -#include "mozilla/Util.h" #include "txStylesheetCompiler.h" #include "txStylesheetCompileHandlers.h" diff --git a/content/xslt/src/xslt/txStylesheetCompiler.cpp b/content/xslt/src/xslt/txStylesheetCompiler.cpp index b38b34fdc4d..9f9424a3122 100644 --- a/content/xslt/src/xslt/txStylesheetCompiler.cpp +++ b/content/xslt/src/xslt/txStylesheetCompiler.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "txStylesheetCompiler.h" #include "txStylesheetCompileHandlers.h" diff --git a/content/xul/document/src/XULDocument.cpp b/content/xul/document/src/XULDocument.cpp index 8ccaa5e0c18..b227de05ec5 100644 --- a/content/xul/document/src/XULDocument.cpp +++ b/content/xul/document/src/XULDocument.cpp @@ -21,7 +21,7 @@ */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" // Note the ALPHABETICAL ORDERING #include "XULDocument.h" diff --git a/content/xul/templates/src/nsXULContentBuilder.cpp b/content/xul/templates/src/nsXULContentBuilder.cpp index 0db1ff42cb0..a1860055d1d 100644 --- a/content/xul/templates/src/nsXULContentBuilder.cpp +++ b/content/xul/templates/src/nsXULContentBuilder.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsContentCID.h" #include "nsIDocument.h" diff --git a/content/xul/templates/src/nsXULContentUtils.cpp b/content/xul/templates/src/nsXULContentUtils.cpp index d20091113a7..aba3543a28e 100644 --- a/content/xul/templates/src/nsXULContentUtils.cpp +++ b/content/xul/templates/src/nsXULContentUtils.cpp @@ -25,7 +25,7 @@ */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsIContent.h" diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 0c703317607..c7fd5c390c1 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -8,6 +8,7 @@ #include +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" #include "mozilla/AutoRestore.h" #include "mozilla/Casting.h" @@ -19,7 +20,6 @@ #include "mozilla/StartupTimeline.h" #include "mozilla/Telemetry.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "mozilla/VisualEventTracer.h" #ifdef MOZ_LOGGING diff --git a/dom/base/DOMException.cpp b/dom/base/DOMException.cpp index af705fa47f7..11f53083db0 100644 --- a/dom/base/DOMException.cpp +++ b/dom/base/DOMException.cpp @@ -7,8 +7,8 @@ #include "jsprf.h" #include "js/OldDebugAPI.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/HoldDropJSObjects.h" -#include "mozilla/Util.h" #include "mozilla/dom/Exceptions.h" #include "nsContentUtils.h" #include "nsCOMPtr.h" diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index 7356d6a5b5e..44b5e80279d 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -4,7 +4,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" // On top because they include basictypes.h: #include "mozilla/dom/SmsFilter.h" diff --git a/dom/base/nsGlobalWindowCommands.cpp b/dom/base/nsGlobalWindowCommands.cpp index 4f8e30ed996..3fc26a7cc8e 100644 --- a/dom/base/nsGlobalWindowCommands.cpp +++ b/dom/base/nsGlobalWindowCommands.cpp @@ -11,8 +11,8 @@ #include "nsIInterfaceRequestorUtils.h" #include "nsCRT.h" #include "nsString.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Preferences.h" -#include "mozilla/Util.h" #include "nsIControllerCommandTable.h" #include "nsICommandParams.h" diff --git a/dom/bindings/BindingUtils.h b/dom/bindings/BindingUtils.h index 750bcc2929b..de98b3cdf3d 100644 --- a/dom/bindings/BindingUtils.h +++ b/dom/bindings/BindingUtils.h @@ -9,6 +9,7 @@ #include "jsfriendapi.h" #include "jswrapper.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Alignment.h" #include "mozilla/Array.h" #include "mozilla/dom/BindingDeclarations.h" @@ -24,7 +25,6 @@ #include "mozilla/HoldDropJSObjects.h" #include "mozilla/Likely.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "nsCycleCollector.h" #include "nsIXPConnect.h" #include "MainThreadUtils.h" diff --git a/dom/bluetooth/bluez/linux/BluetoothDBusService.cpp b/dom/bluetooth/bluez/linux/BluetoothDBusService.cpp index 18c614c78a7..feadaa37908 100644 --- a/dom/bluetooth/bluez/linux/BluetoothDBusService.cpp +++ b/dom/bluetooth/bluez/linux/BluetoothDBusService.cpp @@ -35,6 +35,7 @@ #include "nsThreadUtils.h" #include "nsDebug.h" #include "nsDataHashtable.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Atomics.h" #include "mozilla/dom/bluetooth/BluetoothTypes.h" #include "mozilla/Hal.h" @@ -45,7 +46,6 @@ #include "mozilla/Mutex.h" #include "mozilla/NullPtr.h" #include "mozilla/StaticMutex.h" -#include "mozilla/Util.h" #if defined(MOZ_WIDGET_GONK) #include "cutils/properties.h" diff --git a/dom/encoding/EncodingUtils.cpp b/dom/encoding/EncodingUtils.cpp index ad281ca7fb5..bc9cf22e512 100644 --- a/dom/encoding/EncodingUtils.cpp +++ b/dom/encoding/EncodingUtils.cpp @@ -4,7 +4,7 @@ #include "mozilla/dom/EncodingUtils.h" -#include "mozilla/Util.h" // ArrayLength +#include "mozilla/ArrayUtils.h" // ArrayLength #include "nsUConvPropertySearch.h" #include "nsIUnicodeDecoder.h" #include "nsIUnicodeEncoder.h" diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp index dec5ae5dcab..1cfb84f3282 100644 --- a/dom/plugins/base/nsNPAPIPlugin.cpp +++ b/dom/plugins/base/nsNPAPIPlugin.cpp @@ -6,7 +6,7 @@ #include "base/basictypes.h" /* This must occur *after* layers/PLayerTransaction.h to avoid typedefs conflicts. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "pratom.h" #include "prmem.h" diff --git a/dom/plugins/base/nsPluginsDirWin.cpp b/dom/plugins/base/nsPluginsDirWin.cpp index 9e762668a81..8d3c0b76ea2 100644 --- a/dom/plugins/base/nsPluginsDirWin.cpp +++ b/dom/plugins/base/nsPluginsDirWin.cpp @@ -11,8 +11,8 @@ by Alex Musil */ +#include "mozilla/ArrayUtils.h" // ArrayLength #include "mozilla/DebugOnly.h" -#include "mozilla/Util.h" // ArrayLength #include "nsPluginsDir.h" #include "prlink.h" diff --git a/dom/plugins/ipc/PluginInstanceChild.cpp b/dom/plugins/ipc/PluginInstanceChild.cpp index 09dd5877c6b..b5126698549 100644 --- a/dom/plugins/ipc/PluginInstanceChild.cpp +++ b/dom/plugins/ipc/PluginInstanceChild.cpp @@ -27,7 +27,7 @@ using mozilla::gfx::SharedDIBSurface; #include "gfxUtils.h" #include "gfxAlphaRecovery.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/ipc/MessageChannel.h" #include "mozilla/AutoRestore.h" #include "ImageContainer.h" diff --git a/dom/plugins/ipc/PluginModuleChild.cpp b/dom/plugins/ipc/PluginModuleChild.cpp index 4e8989797da..63e09a24370 100644 --- a/dom/plugins/ipc/PluginModuleChild.cpp +++ b/dom/plugins/ipc/PluginModuleChild.cpp @@ -14,7 +14,7 @@ #include "mozilla/plugins/PluginModuleChild.h" /* This must occur *after* plugins/PluginModuleChild.h to avoid typedefs conflicts. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/ipc/MessageChannel.h" diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp index 91e0744dd8d..82ff35df707 100644 --- a/dom/workers/RuntimeService.cpp +++ b/dom/workers/RuntimeService.cpp @@ -25,6 +25,7 @@ #include "GeckoProfiler.h" #include "js/OldDebugAPI.h" #include "jsfriendapi.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/CycleCollectedJSRuntime.h" #include "mozilla/dom/AtomList.h" #include "mozilla/dom/BindingUtils.h" @@ -34,7 +35,6 @@ #include "mozilla/dom/WorkerBinding.h" #include "mozilla/DebugOnly.h" #include "mozilla/Preferences.h" -#include "mozilla/Util.h" #include "mozilla/dom/Navigator.h" #include "nsContentUtils.h" #include "nsCycleCollector.h" diff --git a/editor/libeditor/html/nsHTMLDataTransfer.cpp b/editor/libeditor/html/nsHTMLDataTransfer.cpp index 6cdd13394f3..d32c772562c 100644 --- a/editor/libeditor/html/nsHTMLDataTransfer.cpp +++ b/editor/libeditor/html/nsHTMLDataTransfer.cpp @@ -7,11 +7,11 @@ #include #include "mozilla/dom/DocumentFragment.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Base64.h" #include "mozilla/BasicEvents.h" #include "mozilla/Preferences.h" #include "mozilla/Selection.h" -#include "mozilla/Util.h" #include "nsAString.h" #include "nsAutoPtr.h" #include "nsCOMArray.h" diff --git a/editor/libeditor/html/nsHTMLEditUtils.cpp b/editor/libeditor/html/nsHTMLEditUtils.cpp index e81de1e6641..c04e1abea0f 100644 --- a/editor/libeditor/html/nsHTMLEditUtils.cpp +++ b/editor/libeditor/html/nsHTMLEditUtils.cpp @@ -3,8 +3,8 @@ * 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 "mozilla/ArrayUtils.h" // for ArrayLength #include "mozilla/Assertions.h" // for MOZ_ASSERT, etc -#include "mozilla/Util.h" // for ArrayLength #include "mozilla/dom/Element.h" // for Element, nsINode #include "nsAString.h" // for nsAString_internal::IsEmpty #include "nsCOMPtr.h" // for nsCOMPtr, operator==, etc diff --git a/editor/libeditor/text/nsPlaintextDataTransfer.cpp b/editor/libeditor/text/nsPlaintextDataTransfer.cpp index 8f5409b0441..2f363337472 100644 --- a/editor/libeditor/text/nsPlaintextDataTransfer.cpp +++ b/editor/libeditor/text/nsPlaintextDataTransfer.cpp @@ -3,8 +3,8 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/MouseEvents.h" -#include "mozilla/Util.h" #include "nsAString.h" #include "nsCOMPtr.h" #include "nsCRT.h" diff --git a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp index 0ed8801283e..2b428aea556 100644 --- a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp +++ b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nspr.h" diff --git a/extensions/auth/nsAuthGSSAPI.cpp b/extensions/auth/nsAuthGSSAPI.cpp index acfefd8b307..a9515ff2910 100644 --- a/extensions/auth/nsAuthGSSAPI.cpp +++ b/extensions/auth/nsAuthGSSAPI.cpp @@ -14,7 +14,7 @@ // // -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "prlink.h" #include "nsCOMPtr.h" diff --git a/extensions/universalchardet/src/base/nsCodingStateMachine.h b/extensions/universalchardet/src/base/nsCodingStateMachine.h index 540ef861b65..5276a2ed004 100644 --- a/extensions/universalchardet/src/base/nsCodingStateMachine.h +++ b/extensions/universalchardet/src/base/nsCodingStateMachine.h @@ -5,8 +5,9 @@ #ifndef nsCodingStateMachine_h__ #define nsCodingStateMachine_h__ +#include "mozilla/ArrayUtils.h" + #include "nsPkgInt.h" -#include "mozilla/Util.h" typedef enum { eStart = 0, diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp index fa6d1d97535..2e0d8143486 100644 --- a/gfx/gl/GLContextProviderEGL.cpp +++ b/gfx/gl/GLContextProviderEGL.cpp @@ -3,8 +3,9 @@ * 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 "mozilla/ArrayUtils.h" + #include "GLContext.h" -#include "mozilla/Util.h" #if defined(XP_UNIX) diff --git a/gfx/layers/RotatedBuffer.cpp b/gfx/layers/RotatedBuffer.cpp index 5a4026deecc..bb041e3b4ff 100644 --- a/gfx/layers/RotatedBuffer.cpp +++ b/gfx/layers/RotatedBuffer.cpp @@ -16,7 +16,7 @@ #include "gfxPlatform.h" // for gfxPlatform #include "gfxPoint.h" // for gfxPoint #include "gfxUtils.h" // for gfxUtils -#include "mozilla/Util.h" // for ArrayLength +#include "mozilla/ArrayUtils.h" // for ArrayLength #include "mozilla/gfx/BasePoint.h" // for BasePoint #include "mozilla/gfx/BaseRect.h" // for BaseRect #include "mozilla/gfx/BaseSize.h" // for BaseSize diff --git a/gfx/layers/client/ContentClient.cpp b/gfx/layers/client/ContentClient.cpp index 7ced190f933..37e09bda027 100644 --- a/gfx/layers/client/ContentClient.cpp +++ b/gfx/layers/client/ContentClient.cpp @@ -13,7 +13,7 @@ #include "gfxTeeSurface.h" // for gfxTeeSurface #include "gfxUtils.h" // for gfxUtils #include "ipc/ShadowLayers.h" // for ShadowLayerForwarder -#include "mozilla/Util.h" // for ArrayLength +#include "mozilla/ArrayUtils.h" // for ArrayLength #include "mozilla/gfx/2D.h" // for DrawTarget, Factory #include "mozilla/gfx/BasePoint.h" // for BasePoint #include "mozilla/gfx/BaseSize.h" // for BaseSize diff --git a/gfx/layers/d3d10/ThebesLayerD3D10.cpp b/gfx/layers/d3d10/ThebesLayerD3D10.cpp index f6239932fc5..98e0961a907 100644 --- a/gfx/layers/d3d10/ThebesLayerD3D10.cpp +++ b/gfx/layers/d3d10/ThebesLayerD3D10.cpp @@ -7,7 +7,7 @@ // This must occur *after* layers/PLayerTransaction.h to avoid // typedefs conflicts. -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "ThebesLayerD3D10.h" #include "gfxPlatform.h" diff --git a/gfx/layers/d3d9/ThebesLayerD3D9.cpp b/gfx/layers/d3d9/ThebesLayerD3D9.cpp index 8543fa8f969..6dbc6752cac 100644 --- a/gfx/layers/d3d9/ThebesLayerD3D9.cpp +++ b/gfx/layers/d3d9/ThebesLayerD3D9.cpp @@ -7,7 +7,7 @@ // This must occur *after* layers/PLayerTransaction.h to avoid // typedefs conflicts. -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "ipc/AutoOpenSurface.h" diff --git a/gfx/layers/opengl/CompositorOGL.cpp b/gfx/layers/opengl/CompositorOGL.cpp index 416f2bbb9a4..31889957e7c 100644 --- a/gfx/layers/opengl/CompositorOGL.cpp +++ b/gfx/layers/opengl/CompositorOGL.cpp @@ -23,8 +23,8 @@ #include "gfxPlatform.h" // for gfxPlatform #include "gfxRect.h" // for gfxRect #include "gfxUtils.h" // for NextPowerOfTwo, gfxUtils, etc +#include "mozilla/ArrayUtils.h" // for ArrayLength #include "mozilla/Preferences.h" // for Preferences -#include "mozilla/Util.h" // for ArrayLength #include "mozilla/gfx/BasePoint.h" // for BasePoint #include "mozilla/gfx/Matrix.h" // for Matrix4x4, Matrix #include "mozilla/layers/CompositingRenderTargetOGL.h" diff --git a/gfx/src/nsColor.cpp b/gfx/src/nsColor.cpp index d610fbd80be..be9e734b709 100644 --- a/gfx/src/nsColor.cpp +++ b/gfx/src/nsColor.cpp @@ -3,16 +3,15 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" // for ArrayLength +#include "mozilla/mozalloc.h" // for operator delete, etc #include "nsColor.h" #include // for int32_t -#include "mozilla/Util.h" // for ArrayLength -#include "mozilla/mozalloc.h" // for operator delete, etc #include "nsColorNames.h" // for nsColorNames #include "nsDebug.h" // for NS_ASSERTION, etc #include "nsStaticNameTable.h" -#include "nsString.h" // for nsAutoCString, nsString, etc +#include "nsString.h" // for nsAutoCString, nsString, etc #include "nscore.h" // for nsAString, etc using namespace mozilla; diff --git a/gfx/tests/gtest/TestColorNames.cpp b/gfx/tests/gtest/TestColorNames.cpp index 3001e9e072f..9e620d5bf78 100644 --- a/gfx/tests/gtest/TestColorNames.cpp +++ b/gfx/tests/gtest/TestColorNames.cpp @@ -10,7 +10,7 @@ #include "nsColorNames.h" #include "prprf.h" #include "nsString.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" // define an array of all color names #define GFX_COLOR(_name, _value) #_name, diff --git a/gfx/tests/gtest/gfxTextRunPerfTest.cpp b/gfx/tests/gtest/gfxTextRunPerfTest.cpp index a62690c4411..18773061ab2 100644 --- a/gfx/tests/gtest/gfxTextRunPerfTest.cpp +++ b/gfx/tests/gtest/gfxTextRunPerfTest.cpp @@ -5,7 +5,7 @@ #include "gtest/gtest.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsTArray.h" diff --git a/gfx/thebes/gfxCoreTextShaper.cpp b/gfx/thebes/gfxCoreTextShaper.cpp index a266774134a..4991f4d000c 100644 --- a/gfx/thebes/gfxCoreTextShaper.cpp +++ b/gfx/thebes/gfxCoreTextShaper.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "gfxCoreTextShaper.h" #include "gfxMacFont.h" #include "gfxFontUtils.h" diff --git a/gfx/thebes/gfxDWriteFontList.cpp b/gfx/thebes/gfxDWriteFontList.cpp index df3f018971a..6ec89b96506 100644 --- a/gfx/thebes/gfxDWriteFontList.cpp +++ b/gfx/thebes/gfxDWriteFontList.cpp @@ -3,8 +3,8 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #ifdef MOZ_LOGGING #define FORCE_PR_LOG /* Allow logging in the release build */ diff --git a/gfx/thebes/gfxFT2FontList.cpp b/gfx/thebes/gfxFT2FontList.cpp index d8fee12d2bc..2d204d6c7ab 100644 --- a/gfx/thebes/gfxFT2FontList.cpp +++ b/gfx/thebes/gfxFT2FontList.cpp @@ -3,8 +3,8 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #if (MOZ_WIDGET_GTK == 2) #include "gfxPlatformGtk.h" diff --git a/gfx/thebes/gfxFontUtils.cpp b/gfx/thebes/gfxFontUtils.cpp index a3971151e5e..c4fd5a9c17e 100644 --- a/gfx/thebes/gfxFontUtils.cpp +++ b/gfx/thebes/gfxFontUtils.cpp @@ -8,7 +8,7 @@ #include "prlog.h" #endif -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "gfxFontUtils.h" diff --git a/gfx/thebes/gfxFontconfigUtils.cpp b/gfx/thebes/gfxFontconfigUtils.cpp index e64c2767ce1..cefa94e56b8 100644 --- a/gfx/thebes/gfxFontconfigUtils.cpp +++ b/gfx/thebes/gfxFontconfigUtils.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "gfxFontconfigUtils.h" #include "gfxFont.h" diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index 1f925ad548f..85ca8607095 100644 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -4,7 +4,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "gfxWindowsPlatform.h" diff --git a/hal/linux/udev.h b/hal/linux/udev.h index 9c29c2905bf..9f28d95c827 100644 --- a/hal/linux/udev.h +++ b/hal/linux/udev.h @@ -12,7 +12,7 @@ #include -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" namespace mozilla { diff --git a/image/decoders/icon/nsIconURI.cpp b/image/decoders/icon/nsIconURI.cpp index 1ba45332f8c..299e1cb23b4 100644 --- a/image/decoders/icon/nsIconURI.cpp +++ b/image/decoders/icon/nsIconURI.cpp @@ -4,7 +4,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsIconURI.h" #include "nsNetUtil.h" diff --git a/image/decoders/icon/win/nsIconChannel.cpp b/image/decoders/icon/win/nsIconChannel.cpp index 7e0595df3ab..a487dbd8915 100644 --- a/image/decoders/icon/win/nsIconChannel.cpp +++ b/image/decoders/icon/win/nsIconChannel.cpp @@ -4,7 +4,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsIconChannel.h" #include "nsIIconURI.h" diff --git a/intl/locale/src/nsCharsetAlias.cpp b/intl/locale/src/nsCharsetAlias.cpp index 5b8f6a8ad49..e9395528ed6 100644 --- a/intl/locale/src/nsCharsetAlias.cpp +++ b/intl/locale/src/nsCharsetAlias.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCharsetAlias.h" diff --git a/intl/locale/src/os2/nsOS2Charset.cpp b/intl/locale/src/os2/nsOS2Charset.cpp index bf3329f3b3e..6019456ba20 100644 --- a/intl/locale/src/os2/nsOS2Charset.cpp +++ b/intl/locale/src/os2/nsOS2Charset.cpp @@ -4,7 +4,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsIPlatformCharset.h" #include "nsUConvPropertySearch.h" diff --git a/intl/locale/src/unix/nsUNIXCharset.cpp b/intl/locale/src/unix/nsUNIXCharset.cpp index 656c95bb612..4086d3bb413 100644 --- a/intl/locale/src/unix/nsUNIXCharset.cpp +++ b/intl/locale/src/unix/nsUNIXCharset.cpp @@ -5,7 +5,7 @@ #include -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsIPlatformCharset.h" #include "nsUConvPropertySearch.h" diff --git a/intl/locale/src/windows/nsWin32Locale.cpp b/intl/locale/src/windows/nsWin32Locale.cpp index 55fd56bcbb8..1f901460bfe 100644 --- a/intl/locale/src/windows/nsWin32Locale.cpp +++ b/intl/locale/src/windows/nsWin32Locale.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nscore.h" #include "nsString.h" diff --git a/intl/locale/src/windows/nsWinCharset.cpp b/intl/locale/src/windows/nsWinCharset.cpp index 52c45d05200..54888be7525 100644 --- a/intl/locale/src/windows/nsWinCharset.cpp +++ b/intl/locale/src/windows/nsWinCharset.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsIPlatformCharset.h" #include "nsUConvPropertySearch.h" diff --git a/intl/unicharutil/util/nsSpecialCasingData.cpp b/intl/unicharutil/util/nsSpecialCasingData.cpp index a60714c14ad..f822c55e6f6 100644 --- a/intl/unicharutil/util/nsSpecialCasingData.cpp +++ b/intl/unicharutil/util/nsSpecialCasingData.cpp @@ -6,7 +6,7 @@ by genSpecialCasingData.pl - do not edit! */ #include "nsSpecialCasingData.h" -#include "mozilla/Util.h" // for ArrayLength +#include "mozilla/ArrayUtils.h" // for ArrayLength #include // for bsearch /* SpecialCasing-6.1.0.txt */ diff --git a/intl/unicharutil/util/nsUnicodeProperties.cpp b/intl/unicharutil/util/nsUnicodeProperties.cpp index 2d91e3e2d43..e1be052c569 100644 --- a/intl/unicharutil/util/nsUnicodeProperties.cpp +++ b/intl/unicharutil/util/nsUnicodeProperties.cpp @@ -6,7 +6,7 @@ #include "nsUnicodeProperties.h" #include "nsUnicodePropertyData.cpp" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCharTraits.h" #define UNICODE_BMP_LIMIT 0x10000 diff --git a/ipc/glue/IPCMessageUtils.h b/ipc/glue/IPCMessageUtils.h index 1c518eeaaaa..16ab5e402bc 100644 --- a/ipc/glue/IPCMessageUtils.h +++ b/ipc/glue/IPCMessageUtils.h @@ -10,11 +10,11 @@ #include "base/process_util.h" #include "chrome/common/ipc_message_utils.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/TimeStamp.h" #ifdef XP_WIN #include "mozilla/TimeStamp_windows.h" #endif -#include "mozilla/Util.h" #include diff --git a/ipc/glue/URIUtils.cpp b/ipc/glue/URIUtils.cpp index 1718821fca2..d90c63a7639 100644 --- a/ipc/glue/URIUtils.cpp +++ b/ipc/glue/URIUtils.cpp @@ -6,8 +6,8 @@ #include "nsIIPCSerializableURI.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Assertions.h" -#include "mozilla/Util.h" #include "nsComponentManagerUtils.h" #include "nsDebug.h" #include "nsID.h" diff --git a/ipc/testshell/TestShellParent.cpp b/ipc/testshell/TestShellParent.cpp index 48a31c650c8..01feecc53c0 100644 --- a/ipc/testshell/TestShellParent.cpp +++ b/ipc/testshell/TestShellParent.cpp @@ -5,7 +5,7 @@ #include "TestShellParent.h" /* This must occur *after* TestShellParent.h to avoid typedefs conflicts. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/ContentParent.h" diff --git a/js/src/builtin/Object.cpp b/js/src/builtin/Object.cpp index 8994108f0bf..c7762568598 100644 --- a/js/src/builtin/Object.cpp +++ b/js/src/builtin/Object.cpp @@ -6,7 +6,7 @@ #include "builtin/Object.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "jscntxt.h" diff --git a/js/src/gc/RootMarking.cpp b/js/src/gc/RootMarking.cpp index 0f7ba5f4443..3865d02c750 100644 --- a/js/src/gc/RootMarking.cpp +++ b/js/src/gc/RootMarking.cpp @@ -4,7 +4,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #ifdef MOZ_VALGRIND # include diff --git a/js/src/jit/arm/Assembler-arm.h b/js/src/jit/arm/Assembler-arm.h index 11ad7f75053..f364551e96a 100644 --- a/js/src/jit/arm/Assembler-arm.h +++ b/js/src/jit/arm/Assembler-arm.h @@ -7,9 +7,9 @@ #ifndef jit_arm_Assembler_arm_h #define jit_arm_Assembler_arm_h +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" #include "mozilla/MathAlgorithms.h" -#include "mozilla/Util.h" #include "assembler/assembler/AssemblerBufferWithConstantPool.h" #include "jit/arm/Architecture-arm.h" diff --git a/js/src/jit/x64/Assembler-x64.h b/js/src/jit/x64/Assembler-x64.h index aadcc2f7efc..ca4c6161e1d 100644 --- a/js/src/jit/x64/Assembler-x64.h +++ b/js/src/jit/x64/Assembler-x64.h @@ -7,7 +7,7 @@ #ifndef jit_x64_Assembler_x64_h #define jit_x64_Assembler_x64_h -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "jit/IonCode.h" #include "jit/shared/Assembler-shared.h" diff --git a/js/src/jit/x86/Assembler-x86.h b/js/src/jit/x86/Assembler-x86.h index f68303e176d..302f76bcd3b 100644 --- a/js/src/jit/x86/Assembler-x86.h +++ b/js/src/jit/x86/Assembler-x86.h @@ -7,7 +7,7 @@ #ifndef jit_x86_Assembler_x86_h #define jit_x86_Assembler_x86_h -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "assembler/assembler/X86Assembler.h" #include "jit/CompactBuffer.h" diff --git a/js/src/jsapi-tests/testExternalStrings.cpp b/js/src/jsapi-tests/testExternalStrings.cpp index f5cafcbff6a..a6205abc13e 100644 --- a/js/src/jsapi-tests/testExternalStrings.cpp +++ b/js/src/jsapi-tests/testExternalStrings.cpp @@ -2,8 +2,8 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/PodOperations.h" -#include "mozilla/Util.h" #include "jsapi-tests/tests.h" diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index ef3703fd66f..4ea544ab402 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -6,10 +6,10 @@ #include "jsarray.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" #include "mozilla/FloatingPoint.h" #include "mozilla/MathAlgorithms.h" -#include "mozilla/Util.h" #include "jsapi.h" #include "jsatom.h" diff --git a/js/src/jsatom.cpp b/js/src/jsatom.cpp index 189683a1b63..2f6ae88f1f0 100644 --- a/js/src/jsatom.cpp +++ b/js/src/jsatom.cpp @@ -10,8 +10,8 @@ #include "jsatominlines.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/RangedPtr.h" -#include "mozilla/Util.h" #include diff --git a/js/src/jscntxt.cpp b/js/src/jscntxt.cpp index a3e5200d300..18b1b10c238 100644 --- a/js/src/jscntxt.cpp +++ b/js/src/jscntxt.cpp @@ -10,9 +10,9 @@ #include "jscntxtinlines.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include #include diff --git a/js/src/jsdate.cpp b/js/src/jsdate.cpp index 02cf4e71339..dd576921504 100644 --- a/js/src/jsdate.cpp +++ b/js/src/jsdate.cpp @@ -17,8 +17,8 @@ #include "jsdate.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/FloatingPoint.h" -#include "mozilla/Util.h" #include #include diff --git a/js/src/jsexn.cpp b/js/src/jsexn.cpp index e6846784f5a..fbe7bafebac 100644 --- a/js/src/jsexn.cpp +++ b/js/src/jsexn.cpp @@ -10,8 +10,8 @@ #include "jsexn.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/PodOperations.h" -#include "mozilla/Util.h" #include diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp index 868a5c5d95f..672fd8aaa82 100644 --- a/js/src/jsfun.cpp +++ b/js/src/jsfun.cpp @@ -10,8 +10,8 @@ #include "jsfuninlines.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/PodOperations.h" -#include "mozilla/Util.h" #include diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index f6fc70878a6..70f6fa2a332 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -173,10 +173,10 @@ #include "jsgcinlines.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" #include "mozilla/MemoryReporting.h" #include "mozilla/Move.h" -#include "mozilla/Util.h" #include /* for memset used when DEBUG */ #ifndef XP_WIN diff --git a/js/src/jsiter.cpp b/js/src/jsiter.cpp index ce607bdb09e..d43ef039003 100644 --- a/js/src/jsiter.cpp +++ b/js/src/jsiter.cpp @@ -8,9 +8,9 @@ #include "jsiter.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" #include "mozilla/PodOperations.h" -#include "mozilla/Util.h" #include "jsarray.h" #include "jsatom.h" diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp index ec08b2aa086..51ab674ec9b 100644 --- a/js/src/jsobj.cpp +++ b/js/src/jsobj.cpp @@ -10,10 +10,10 @@ #include "jsobjinlines.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/MathAlgorithms.h" #include "mozilla/MemoryReporting.h" #include "mozilla/TemplateLib.h" -#include "mozilla/Util.h" #include diff --git a/js/src/jsreflect.cpp b/js/src/jsreflect.cpp index 0350fd26ece..1c735b85f9c 100644 --- a/js/src/jsreflect.cpp +++ b/js/src/jsreflect.cpp @@ -8,8 +8,8 @@ #include "jsreflect.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" -#include "mozilla/Util.h" #include diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index c3abf95a940..bfc2548b54c 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -5,11 +5,11 @@ /* JS shell. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/Atomics.h" #include "mozilla/DebugOnly.h" #include "mozilla/GuardObjects.h" #include "mozilla/PodOperations.h" -#include "mozilla/Util.h" #ifdef XP_WIN # include diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index b6ec193d915..d9e57b8cfb2 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -6,11 +6,11 @@ #include "vm/Runtime-inl.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Atomics.h" #include "mozilla/DebugOnly.h" #include "mozilla/MemoryReporting.h" #include "mozilla/ThreadLocal.h" -#include "mozilla/Util.h" #include #include diff --git a/js/xpconnect/src/XPCConvert.cpp b/js/xpconnect/src/XPCConvert.cpp index 755fe87f934..036a4295187 100644 --- a/js/xpconnect/src/XPCConvert.cpp +++ b/js/xpconnect/src/XPCConvert.cpp @@ -7,7 +7,7 @@ /* Data conversion between native and JavaScript types. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "xpcprivate.h" #include "nsIAtom.h" diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 4474721c8ef..b39d789db9a 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -6,9 +6,9 @@ #include "nsLayoutUtils.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/BasicEvents.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "nsPresContext.h" #include "nsIContent.h" #include "nsIDOMHTMLDocument.h" diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index ce85e8cdb10..79bd1f45103 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -23,13 +23,13 @@ #endif #include "prlog.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" #include "mozilla/dom/TabChild.h" #include "mozilla/Likely.h" #include "mozilla/MouseEvents.h" #include "mozilla/TextEvents.h" #include "mozilla/TouchEvents.h" -#include "mozilla/Util.h" #include #ifdef XP_WIN diff --git a/layout/base/nsRefreshDriver.cpp b/layout/base/nsRefreshDriver.cpp index b07041128e3..77e5047d65b 100644 --- a/layout/base/nsRefreshDriver.cpp +++ b/layout/base/nsRefreshDriver.cpp @@ -25,7 +25,7 @@ #include "WinUtils.h" #endif -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/AutoRestore.h" #include "nsRefreshDriver.h" #include "nsITimer.h" diff --git a/layout/generic/MathVariantTextRunFactory.cpp b/layout/generic/MathVariantTextRunFactory.cpp index 211e9debe97..70866775364 100644 --- a/layout/generic/MathVariantTextRunFactory.cpp +++ b/layout/generic/MathVariantTextRunFactory.cpp @@ -4,10 +4,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "MathVariantTextRunFactory.h" + +#include "mozilla/ArrayUtils.h" + #include "nsStyleConsts.h" #include "nsStyleContext.h" #include "nsTextFrameUtils.h" -#include "mozilla/Util.h" using namespace mozilla; diff --git a/layout/generic/TextOverflow.cpp b/layout/generic/TextOverflow.cpp index ddb43c15ccc..db1eae28bf9 100644 --- a/layout/generic/TextOverflow.cpp +++ b/layout/generic/TextOverflow.cpp @@ -20,7 +20,7 @@ #include "nsRenderingContext.h" #include "nsTextFrame.h" #include "nsIFrameInlines.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Likely.h" namespace mozilla { diff --git a/layout/style/Declaration.cpp b/layout/style/Declaration.cpp index ab5a087eec7..7de437af96d 100644 --- a/layout/style/Declaration.cpp +++ b/layout/style/Declaration.cpp @@ -8,8 +8,8 @@ * stylesheet */ +#include "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "mozilla/css/Declaration.h" #include "nsPrintfCString.h" diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp index 7ba2f2c585e..21a9b3b0f72 100644 --- a/layout/style/Loader.cpp +++ b/layout/style/Loader.cpp @@ -16,8 +16,8 @@ /* loading of CSS style sheets using the network APIs */ +#include "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "mozilla/css/Loader.h" #include "nsIRunnable.h" diff --git a/layout/style/nsCSSAnonBoxes.cpp b/layout/style/nsCSSAnonBoxes.cpp index a5aa44573d2..3585c9e38d0 100644 --- a/layout/style/nsCSSAnonBoxes.cpp +++ b/layout/style/nsCSSAnonBoxes.cpp @@ -5,7 +5,7 @@ /* atom list for CSS anonymous boxes */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCSSAnonBoxes.h" #include "nsAtomListUtils.h" diff --git a/layout/style/nsCSSPropertySet.h b/layout/style/nsCSSPropertySet.h index 9d82cf0e121..6416df61e3b 100644 --- a/layout/style/nsCSSPropertySet.h +++ b/layout/style/nsCSSPropertySet.h @@ -7,7 +7,7 @@ #ifndef nsCSSPropertySet_h__ #define nsCSSPropertySet_h__ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCSSProperty.h" #include // for CHAR_BIT diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index 44297ded280..ab50591c83f 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -8,7 +8,7 @@ * values they accept */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCSSProps.h" #include "nsCSSKeywords.h" diff --git a/layout/style/nsCSSPseudoClasses.cpp b/layout/style/nsCSSPseudoClasses.cpp index 77974b43c97..0ed91b9805e 100644 --- a/layout/style/nsCSSPseudoClasses.cpp +++ b/layout/style/nsCSSPseudoClasses.cpp @@ -5,7 +5,7 @@ /* atom list for CSS pseudo-classes */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCSSPseudoClasses.h" #include "nsStaticAtom.h" diff --git a/layout/style/nsCSSPseudoElements.cpp b/layout/style/nsCSSPseudoElements.cpp index ef4d86c6adf..42e3d463d49 100644 --- a/layout/style/nsCSSPseudoElements.cpp +++ b/layout/style/nsCSSPseudoElements.cpp @@ -5,7 +5,7 @@ /* atom list for CSS pseudo-elements */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCSSPseudoElements.h" #include "nsAtomListUtils.h" diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcessor.cpp index 4eee802e4e0..339cd4ef3b9 100644 --- a/layout/style/nsCSSRuleProcessor.cpp +++ b/layout/style/nsCSSRuleProcessor.cpp @@ -48,10 +48,10 @@ #include "nsStyleSet.h" #include "mozilla/dom/Element.h" #include "nsNthIndexCache.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Preferences.h" #include "mozilla/LookAndFeel.h" #include "mozilla/Likely.h" -#include "mozilla/Util.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/layout/style/nsCSSScanner.cpp b/layout/style/nsCSSScanner.cpp index f11ca5d18ee..88eb1d7abcd 100644 --- a/layout/style/nsCSSScanner.cpp +++ b/layout/style/nsCSSScanner.cpp @@ -9,9 +9,9 @@ #include "nsCSSScanner.h" #include "nsStyleUtil.h" #include "nsTraceRefcnt.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/css/ErrorReporter.h" #include "mozilla/Likely.h" -#include "mozilla/Util.h" #include /* Character class tables and related helper functions. */ diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index 224d391990b..90c18554de7 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -8,8 +8,8 @@ #include "nsComputedDOMStyle.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Preferences.h" -#include "mozilla/Util.h" #include "nsError.h" #include "nsDOMString.h" diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index bdd7b474594..226c92873d2 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -11,11 +11,11 @@ #include +#include "mozilla/ArrayUtils.h" #include "mozilla/Assertions.h" #include "mozilla/DebugOnly.h" #include "mozilla/Likely.h" #include "mozilla/LookAndFeel.h" -#include "mozilla/Util.h" #include "nsRuleNode.h" #include "nscore.h" diff --git a/layout/style/nsStyleAnimation.cpp b/layout/style/nsStyleAnimation.cpp index 8200cf4514c..20245acacb1 100644 --- a/layout/style/nsStyleAnimation.cpp +++ b/layout/style/nsStyleAnimation.cpp @@ -5,8 +5,8 @@ /* Utilities for animation of computed style values */ +#include "mozilla/ArrayUtils.h" #include "mozilla/MathAlgorithms.h" -#include "mozilla/Util.h" #include "nsStyleAnimation.h" #include "nsStyleTransformMatrix.h" diff --git a/layout/style/nsStyleSet.cpp b/layout/style/nsStyleSet.cpp index 6e9e4671871..53ac54149f9 100644 --- a/layout/style/nsStyleSet.cpp +++ b/layout/style/nsStyleSet.cpp @@ -9,8 +9,8 @@ * potentially re-creating) style contexts */ +#include "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "nsStyleSet.h" #include "nsCSSStyleSheet.h" diff --git a/media/webrtc/signaling/src/sipcc/core/includes/ccapi.h b/media/webrtc/signaling/src/sipcc/core/includes/ccapi.h index aecd96d0b90..937e41f1cae 100755 --- a/media/webrtc/signaling/src/sipcc/core/includes/ccapi.h +++ b/media/webrtc/signaling/src/sipcc/core/includes/ccapi.h @@ -5,8 +5,8 @@ #ifndef _CCAPI_H_ #define _CCAPI_H_ +#include "mozilla/ArrayUtils.h" #include "mozilla/Assertions.h" -#include "mozilla/Util.h" #if defined(__cplusplus) && __cplusplus >= 201103L typedef struct Timecard Timecard; diff --git a/mfbt/Util.h b/mfbt/ArrayUtils.h similarity index 89% rename from mfbt/Util.h rename to mfbt/ArrayUtils.h index 55189bfa2af..e2226bf59de 100644 --- a/mfbt/Util.h +++ b/mfbt/ArrayUtils.h @@ -5,20 +5,19 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* - * Miscellaneous uncategorized functionality. Please add new functionality to - * new headers, or to other appropriate existing headers, not here. + * Implements various helper functions related to arrays. */ -#ifndef mozilla_Util_h -#define mozilla_Util_h +#ifndef mozilla_ArrayUtils_h +#define mozilla_ArrayUtils_h #include "mozilla/Assertions.h" #include "mozilla/Attributes.h" -#include "mozilla/Types.h" + +#include #ifdef __cplusplus -#include "mozilla/Alignment.h" #include "mozilla/Array.h" namespace mozilla { @@ -98,4 +97,4 @@ ArrayEnd(const Array& arr) # define MOZ_ARRAY_LENGTH(array) (sizeof(array)/sizeof((array)[0])) #endif -#endif /* mozilla_Util_h */ +#endif /* mozilla_ArrayUtils_h */ diff --git a/mfbt/PodOperations.h b/mfbt/PodOperations.h index 4832c0fd717..adbf2e699d6 100644 --- a/mfbt/PodOperations.h +++ b/mfbt/PodOperations.h @@ -16,9 +16,10 @@ #define mozilla_PodOperations_h #include "mozilla/Array.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" -#include "mozilla/Util.h" +#include #include namespace mozilla { diff --git a/mfbt/RangedPtr.h b/mfbt/RangedPtr.h index 493fcdbaee6..561e564ded5 100644 --- a/mfbt/RangedPtr.h +++ b/mfbt/RangedPtr.h @@ -12,10 +12,12 @@ #ifndef mozilla_RangedPtr_h #define mozilla_RangedPtr_h +#include "mozilla/ArrayUtils.h" #include "mozilla/Assertions.h" #include "mozilla/Attributes.h" #include "mozilla/NullPtr.h" -#include "mozilla/Util.h" + +#include namespace mozilla { diff --git a/mfbt/STYLE b/mfbt/STYLE index 8b8b3a93268..bdae22a4101 100644 --- a/mfbt/STYLE +++ b/mfbt/STYLE @@ -345,8 +345,7 @@ block start/end as needed. The contents of these blocks should not be indented. Add new functionality to new headers unless an existing header makes sense. Err on the side of more headers rather than fewer, as this helps to minimize -dependencies. Don't add anything to Util.h, which will be split into multiple -headers at some point (bug 713082). +dependencies. Don't use bool for argument types unless the method is a "set" or "enable"-style method where the method name and bool value together indicate the sense of its diff --git a/mfbt/Vector.h b/mfbt/Vector.h index eafa6f3aae4..c67467524f6 100644 --- a/mfbt/Vector.h +++ b/mfbt/Vector.h @@ -11,6 +11,7 @@ #include "mozilla/Alignment.h" #include "mozilla/AllocPolicy.h" +#include "mozilla/ArrayUtils.h" // for PointerRangeSize #include "mozilla/Assertions.h" #include "mozilla/Attributes.h" #include "mozilla/MathAlgorithms.h" @@ -20,7 +21,6 @@ #include "mozilla/ReentrancyGuard.h" #include "mozilla/TemplateLib.h" #include "mozilla/TypeTraits.h" -#include "mozilla/Util.h" // for PointerRangeSize #include // for placement new diff --git a/mfbt/common.mozbuild b/mfbt/common.mozbuild index dc3f7d96cab..deb26d97899 100644 --- a/mfbt/common.mozbuild +++ b/mfbt/common.mozbuild @@ -14,6 +14,7 @@ mfbt_headers = [ 'Alignment.h', 'AllocPolicy.h', 'Array.h', + 'ArrayUtils.h', 'Assertions.h', 'Atomics.h', 'Attributes.h', @@ -57,7 +58,6 @@ mfbt_headers = [ 'TypedEnum.h', 'Types.h', 'TypeTraits.h', - 'Util.h', 'Vector.h', 'WeakPtr.h', ] diff --git a/mfbt/decimal/moz-decimal-utils.h b/mfbt/decimal/moz-decimal-utils.h index 0077407e743..fb5d5af8719 100644 --- a/mfbt/decimal/moz-decimal-utils.h +++ b/mfbt/decimal/moz-decimal-utils.h @@ -11,7 +11,7 @@ // not include it into any file other than Decimal.cpp. #include "../double-conversion/double-conversion.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Casting.h" #include "mozilla/FloatingPoint.h" #include "mozilla/NullPtr.h" diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferences.cpp index dfff204cf1e..5d532c3af8d 100644 --- a/modules/libpref/src/Preferences.cpp +++ b/modules/libpref/src/Preferences.cpp @@ -7,8 +7,8 @@ #include "mozilla/MemoryReporting.h" #include "mozilla/dom/ContentChild.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" -#include "mozilla/Util.h" #include "mozilla/HashFunctions.h" #include "nsXULAppAPI.h" diff --git a/netwerk/base/src/nsProtocolProxyService.cpp b/netwerk/base/src/nsProtocolProxyService.cpp index a3b6b42e90f..8005b3a4ef1 100644 --- a/netwerk/base/src/nsProtocolProxyService.cpp +++ b/netwerk/base/src/nsProtocolProxyService.cpp @@ -4,8 +4,8 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" -#include "mozilla/Util.h" #include "nsProtocolProxyService.h" #include "nsProxyInfo.h" diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp index 9ae9789abb1..350d8ce2636 100644 --- a/netwerk/cache/nsCacheService.cpp +++ b/netwerk/cache/nsCacheService.cpp @@ -4,10 +4,10 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" #include "mozilla/Assertions.h" #include "mozilla/DebugOnly.h" -#include "mozilla/Util.h" #include "necko-config.h" diff --git a/netwerk/cache/nsDiskCacheDeviceSQL.cpp b/netwerk/cache/nsDiskCacheDeviceSQL.cpp index dd5cfdbeedc..2110c5340ec 100644 --- a/netwerk/cache/nsDiskCacheDeviceSQL.cpp +++ b/netwerk/cache/nsDiskCacheDeviceSQL.cpp @@ -4,7 +4,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" #include "nsCache.h" diff --git a/netwerk/dns/nsEffectiveTLDService.cpp b/netwerk/dns/nsEffectiveTLDService.cpp index e8427d408eb..640ce0de435 100644 --- a/netwerk/dns/nsEffectiveTLDService.cpp +++ b/netwerk/dns/nsEffectiveTLDService.cpp @@ -8,8 +8,8 @@ // complete description of the expected file format and parsing rules, see // http://wiki.mozilla.org/Gecko:Effective_TLD_Service +#include "mozilla/ArrayUtils.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "nsEffectiveTLDService.h" #include "nsIIDNService.h" diff --git a/netwerk/streamconv/converters/nsDirIndexParser.cpp b/netwerk/streamconv/converters/nsDirIndexParser.cpp index 3e0c5b9b7f2..e1a6e1bb9f0 100644 --- a/netwerk/streamconv/converters/nsDirIndexParser.cpp +++ b/netwerk/streamconv/converters/nsDirIndexParser.cpp @@ -5,7 +5,7 @@ /* This parsing code originally lived in xpfe/components/directory/ - bbaetz */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "prprf.h" diff --git a/netwerk/wifi/nsWifiAccessPoint.h b/netwerk/wifi/nsWifiAccessPoint.h index e11e15b75fa..95b0f5cdf71 100644 --- a/netwerk/wifi/nsWifiAccessPoint.h +++ b/netwerk/wifi/nsWifiAccessPoint.h @@ -7,8 +7,8 @@ #include "nsString.h" #include "nsCOMArray.h" +#include "mozilla/ArrayUtils.h" // ArrayLength #include "mozilla/Attributes.h" -#include "mozilla/Util.h" // ArrayLength #ifndef __nsWifiAccessPoint__ #define __nsWifiAccessPoint__ diff --git a/parser/htmlparser/src/nsHTMLEntities.cpp b/parser/htmlparser/src/nsHTMLEntities.cpp index e597cd8abcc..156de928665 100644 --- a/parser/htmlparser/src/nsHTMLEntities.cpp +++ b/parser/htmlparser/src/nsHTMLEntities.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsHTMLEntities.h" diff --git a/security/manager/ssl/tests/unit/tlsserver/cmd/GenerateOCSPResponse.cpp b/security/manager/ssl/tests/unit/tlsserver/cmd/GenerateOCSPResponse.cpp index a528176426d..dcbb3775ae4 100644 --- a/security/manager/ssl/tests/unit/tlsserver/cmd/GenerateOCSPResponse.cpp +++ b/security/manager/ssl/tests/unit/tlsserver/cmd/GenerateOCSPResponse.cpp @@ -11,7 +11,8 @@ #include -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" + #include "nspr.h" #include "nss.h" #include "plarenas.h" diff --git a/security/sandbox/linux/Sandbox.cpp b/security/sandbox/linux/Sandbox.cpp index 4cd74e33000..a1c81b9493d 100644 --- a/security/sandbox/linux/Sandbox.cpp +++ b/security/sandbox/linux/Sandbox.cpp @@ -11,8 +11,8 @@ #include #include +#include "mozilla/ArrayUtils.h" #include "mozilla/NullPtr.h" -#include "mozilla/Util.h" #if defined(ANDROID) #include "android_ucontext.h" #include diff --git a/storage/src/SQLCollations.cpp b/storage/src/SQLCollations.cpp index eab36085f2f..219387b9229 100644 --- a/storage/src/SQLCollations.cpp +++ b/storage/src/SQLCollations.cpp @@ -4,7 +4,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "SQLCollations.h" diff --git a/storage/src/mozStorageSQLFunctions.cpp b/storage/src/mozStorageSQLFunctions.cpp index fbdc676bb4a..163c1b13bc2 100644 --- a/storage/src/mozStorageSQLFunctions.cpp +++ b/storage/src/mozStorageSQLFunctions.cpp @@ -4,7 +4,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozStorageSQLFunctions.h" #include "nsUnicharUtils.h" diff --git a/toolkit/components/places/Database.cpp b/toolkit/components/places/Database.cpp index e825cbb0f45..fdfb32f3a4b 100644 --- a/toolkit/components/places/Database.cpp +++ b/toolkit/components/places/Database.cpp @@ -2,9 +2,9 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" #include "mozilla/DebugOnly.h" -#include "mozilla/Util.h" #include "Database.h" diff --git a/toolkit/components/places/History.cpp b/toolkit/components/places/History.cpp index dcfc266cd64..8b05135b430 100644 --- a/toolkit/components/places/History.cpp +++ b/toolkit/components/places/History.cpp @@ -4,10 +4,10 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" #include "mozilla/DebugOnly.h" #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "mozilla/dom/ContentChild.h" #include "mozilla/dom/ContentParent.h" diff --git a/toolkit/components/places/nsAnnotationService.cpp b/toolkit/components/places/nsAnnotationService.cpp index 54e58fd5bd8..dfcd5cef86e 100644 --- a/toolkit/components/places/nsAnnotationService.cpp +++ b/toolkit/components/places/nsAnnotationService.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsAnnotationService.h" #include "nsNavHistory.h" diff --git a/toolkit/components/places/nsFaviconService.cpp b/toolkit/components/places/nsFaviconService.cpp index 51d1c4c7011..38763a286c4 100644 --- a/toolkit/components/places/nsFaviconService.cpp +++ b/toolkit/components/places/nsFaviconService.cpp @@ -25,8 +25,8 @@ #include "nsStringStream.h" #include "plbase64.h" #include "nsIClassInfoImpl.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Preferences.h" -#include "mozilla/Util.h" // For large favicons optimization. #include "imgITools.h" diff --git a/toolkit/components/remote/nsXRemoteService.cpp b/toolkit/components/remote/nsXRemoteService.cpp index de73ca11bf5..bb5aab39260 100644 --- a/toolkit/components/remote/nsXRemoteService.cpp +++ b/toolkit/components/remote/nsXRemoteService.cpp @@ -5,7 +5,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsXRemoteService.h" #include "nsIObserverService.h" diff --git a/toolkit/components/startup/nsUserInfoWin.cpp b/toolkit/components/startup/nsUserInfoWin.cpp index 1338bfd939d..de5b30527ec 100644 --- a/toolkit/components/startup/nsUserInfoWin.cpp +++ b/toolkit/components/startup/nsUserInfoWin.cpp @@ -5,7 +5,7 @@ #include "nsUserInfo.h" -#include "mozilla/Util.h" // ArrayLength +#include "mozilla/ArrayUtils.h" // ArrayLength #include "nsString.h" #include "windows.h" #include "nsCRT.h" diff --git a/toolkit/crashreporter/nsExceptionHandler.cpp b/toolkit/crashreporter/nsExceptionHandler.cpp index 23b37f72921..f91bf9abf62 100644 --- a/toolkit/crashreporter/nsExceptionHandler.cpp +++ b/toolkit/crashreporter/nsExceptionHandler.cpp @@ -5,11 +5,11 @@ #include "nsExceptionHandler.h" #include "nsDataHashtable.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/dom/CrashReporterChild.h" #include "mozilla/Services.h" #include "nsIObserverService.h" #include "mozilla/unused.h" -#include "mozilla/Util.h" #include "nsThreadUtils.h" #include "nsXULAppAPI.h" diff --git a/toolkit/identity/IdentityCryptoService.cpp b/toolkit/identity/IdentityCryptoService.cpp index 9ce1beef4f1..d5f45ce6c3f 100644 --- a/toolkit/identity/IdentityCryptoService.cpp +++ b/toolkit/identity/IdentityCryptoService.cpp @@ -13,8 +13,8 @@ #include "nsCOMPtr.h" #include "nsProxyRelease.h" #include "nsString.h" +#include "mozilla/ArrayUtils.h" // ArrayLength #include "mozilla/Base64.h" -#include "mozilla/Util.h" // ArrayLength #include "ScopedNSSTypes.h" #include "nss.h" diff --git a/toolkit/mozapps/update/tests/TestAUSReadStrings.cpp b/toolkit/mozapps/update/tests/TestAUSReadStrings.cpp index 9536dae0d94..8bb58aa279d 100644 --- a/toolkit/mozapps/update/tests/TestAUSReadStrings.cpp +++ b/toolkit/mozapps/update/tests/TestAUSReadStrings.cpp @@ -37,7 +37,7 @@ #include "updater/progressui.h" #include "common/readstrings.h" #include "common/errors.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #ifndef MAXPATHLEN # ifdef PATH_MAX diff --git a/toolkit/profile/nsToolkitProfileService.cpp b/toolkit/profile/nsToolkitProfileService.cpp index 0717214e57b..d6d101d27e5 100644 --- a/toolkit/profile/nsToolkitProfileService.cpp +++ b/toolkit/profile/nsToolkitProfileService.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include #include diff --git a/toolkit/system/gnome/nsGConfService.cpp b/toolkit/system/gnome/nsGConfService.cpp index 0bfaf51f3f5..cff67b13dda 100644 --- a/toolkit/system/gnome/nsGConfService.cpp +++ b/toolkit/system/gnome/nsGConfService.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsGConfService.h" #include "nsStringAPI.h" #include "nsCOMPtr.h" diff --git a/toolkit/system/gnome/nsGSettingsService.cpp b/toolkit/system/gnome/nsGSettingsService.cpp index 7cf0424c1e0..184e54ea629 100644 --- a/toolkit/system/gnome/nsGSettingsService.cpp +++ b/toolkit/system/gnome/nsGSettingsService.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsGSettingsService.h" #include "nsStringAPI.h" diff --git a/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp b/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp index c8aa0dd34ba..61619020108 100644 --- a/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp +++ b/toolkit/system/windowsproxy/nsWindowsSystemProxySettings.cpp @@ -7,8 +7,8 @@ #include #include +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" -#include "mozilla/Util.h" #include "nsISystemProxySettings.h" #include "nsIServiceManager.h" #include "mozilla/ModuleUtils.h" diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 6ea979595ba..f5dd1d72496 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -21,11 +21,11 @@ #include "mozilla/dom/ContentParent.h" #include "mozilla/dom/ContentChild.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" #include "mozilla/Likely.h" #include "mozilla/Poison.h" #include "mozilla/Telemetry.h" -#include "mozilla/Util.h" #include "nsAppRunner.h" #include "mozilla/AppData.h" diff --git a/tools/profiler/JSCustomObjectBuilder.cpp b/tools/profiler/JSCustomObjectBuilder.cpp index cfb64f8cca0..713f45b853a 100644 --- a/tools/profiler/JSCustomObjectBuilder.cpp +++ b/tools/profiler/JSCustomObjectBuilder.cpp @@ -5,7 +5,7 @@ #include "JSCustomObjectBuilder.h" -#include "mozilla/Util.h" // for ArrayLength +#include "mozilla/ArrayUtils.h" // for ArrayLength #include "nsDataHashtable.h" #include "nsString.h" #include "nsTArray.h" diff --git a/tools/profiler/PseudoStack.h b/tools/profiler/PseudoStack.h index 2da8fcefa74..d366dfd0c38 100644 --- a/tools/profiler/PseudoStack.h +++ b/tools/profiler/PseudoStack.h @@ -6,6 +6,7 @@ #ifndef PROFILER_PSEUDO_STACK_H_ #define PROFILER_PSEUDO_STACK_H_ +#include "mozilla/ArrayUtils.h" #include "mozilla/NullPtr.h" #include #include "js/ProfilingStack.h" diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp index af1b385d976..1a3d22d30c4 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.cpp +++ b/uriloader/exthandler/nsExternalHelperAppService.cpp @@ -11,8 +11,8 @@ #include "base/basictypes.h" /* This must occur *after* base/basictypes.h to avoid typedefs conflicts. */ +#include "mozilla/ArrayUtils.h" #include "mozilla/Base64.h" -#include "mozilla/Util.h" #include "mozilla/dom/ContentChild.h" #include "mozilla/dom/TabChild.h" diff --git a/widget/cocoa/GfxInfo.mm b/widget/cocoa/GfxInfo.mm index ee7f5430e4b..a94f0bd10a6 100644 --- a/widget/cocoa/GfxInfo.mm +++ b/widget/cocoa/GfxInfo.mm @@ -6,7 +6,7 @@ #include #include -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "GfxInfo.h" #include "nsUnicharUtils.h" diff --git a/widget/cocoa/TextInputHandler.mm b/widget/cocoa/TextInputHandler.mm index 00f39a13427..e2d33f3fae3 100644 --- a/widget/cocoa/TextInputHandler.mm +++ b/widget/cocoa/TextInputHandler.mm @@ -4,7 +4,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "TextInputHandler.h" diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index 7949b6ce008..bb949b80a79 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #ifdef MOZ_LOGGING #define FORCE_PR_LOG diff --git a/widget/cocoa/nsPrintDialogX.mm b/widget/cocoa/nsPrintDialogX.mm index 6cff61b89d8..cbd2d558c70 100644 --- a/widget/cocoa/nsPrintDialogX.mm +++ b/widget/cocoa/nsPrintDialogX.mm @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsPrintDialogX.h" #include "nsIPrintSettings.h" diff --git a/widget/gtk/nsClipboard.cpp b/widget/gtk/nsClipboard.cpp index 92b76fd30c9..a3181d68a2f 100644 --- a/widget/gtk/nsClipboard.cpp +++ b/widget/gtk/nsClipboard.cpp @@ -5,7 +5,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsClipboard.h" #include "nsSupportsPrimitives.h" diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp index 740be04f1f5..3a580cfeafe 100644 --- a/widget/gtk/nsGtkKeyUtils.cpp +++ b/widget/gtk/nsGtkKeyUtils.cpp @@ -26,9 +26,9 @@ PRLogModuleInfo* gKeymapWrapperLog = nullptr; #endif // PR_LOGGING +#include "mozilla/ArrayUtils.h" #include "mozilla/MouseEvents.h" #include "mozilla/TextEvents.h" -#include "mozilla/Util.h" namespace mozilla { namespace widget { diff --git a/widget/gtk/nsNativeKeyBindings.cpp b/widget/gtk/nsNativeKeyBindings.cpp index f0a65c81f40..850efdc1404 100644 --- a/widget/gtk/nsNativeKeyBindings.cpp +++ b/widget/gtk/nsNativeKeyBindings.cpp @@ -3,9 +3,9 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/MathAlgorithms.h" #include "mozilla/TextEvents.h" -#include "mozilla/Util.h" #include "nsNativeKeyBindings.h" #include "nsString.h" diff --git a/widget/gtk/nsPaperPS.cpp b/widget/gtk/nsPaperPS.cpp index 78f64539883..7d583efacea 100644 --- a/widget/gtk/nsPaperPS.cpp +++ b/widget/gtk/nsPaperPS.cpp @@ -4,7 +4,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsPaperPS.h" #include "plstr.h" diff --git a/widget/gtk/nsPrintDialogGTK.cpp b/widget/gtk/nsPrintDialogGTK.cpp index f4f436b1af2..2dd59347ff2 100644 --- a/widget/gtk/nsPrintDialogGTK.cpp +++ b/widget/gtk/nsPrintDialogGTK.cpp @@ -11,7 +11,7 @@ #endif #include -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozcontainer.h" #include "nsIPrintSettings.h" diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp index b83b257501f..bfd8e080260 100644 --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp @@ -5,10 +5,10 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/MiscEvents.h" #include "mozilla/MouseEvents.h" #include "mozilla/TextEvents.h" -#include "mozilla/Util.h" #include #include "prlink.h" diff --git a/widget/qt/nsClipboard.cpp b/widget/qt/nsClipboard.cpp index 1fdafc52c40..6fe5fd1d895 100644 --- a/widget/qt/nsClipboard.cpp +++ b/widget/qt/nsClipboard.cpp @@ -11,7 +11,7 @@ #include #include -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsClipboard.h" #include "nsISupportsPrimitives.h" diff --git a/widget/qt/nsQtKeyUtils.cpp b/widget/qt/nsQtKeyUtils.cpp index ef467702d58..798d07e90cd 100644 --- a/widget/qt/nsQtKeyUtils.cpp +++ b/widget/qt/nsQtKeyUtils.cpp @@ -4,8 +4,8 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/TextEvents.h" -#include "mozilla/Util.h" #include "nsWindow.h" #include "nsQtKeyUtils.h" diff --git a/widget/qt/nsWindow.cpp b/widget/qt/nsWindow.cpp index 655de8a5523..cc7be08a406 100644 --- a/widget/qt/nsWindow.cpp +++ b/widget/qt/nsWindow.cpp @@ -5,11 +5,11 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/MiscEvents.h" #include "mozilla/MouseEvents.h" #include "mozilla/TextEvents.h" #include "mozilla/TouchEvents.h" -#include "mozilla/Util.h" #include #include diff --git a/widget/windows/GfxInfo.cpp b/widget/windows/GfxInfo.cpp index 8fa0c89b42a..09a3d0f852b 100644 --- a/widget/windows/GfxInfo.cpp +++ b/widget/windows/GfxInfo.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include #include diff --git a/widget/windows/KeyboardLayout.cpp b/widget/windows/KeyboardLayout.cpp index 9f91f896f30..50017420635 100644 --- a/widget/windows/KeyboardLayout.cpp +++ b/widget/windows/KeyboardLayout.cpp @@ -3,10 +3,10 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" #include "mozilla/MouseEvents.h" #include "mozilla/TextEvents.h" -#include "mozilla/Util.h" #include "mozilla/WindowsVersion.h" #include "KeyboardLayout.h" diff --git a/widget/windows/TaskbarWindowPreview.cpp b/widget/windows/TaskbarWindowPreview.cpp index ded525ea794..83ea74a8686 100644 --- a/widget/windows/TaskbarWindowPreview.cpp +++ b/widget/windows/TaskbarWindowPreview.cpp @@ -5,7 +5,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include #include "TaskbarWindowPreview.h" diff --git a/widget/windows/nsDataObj.cpp b/widget/windows/nsDataObj.cpp index 8e864d1501f..eb2faa19fb4 100644 --- a/widget/windows/nsDataObj.cpp +++ b/widget/windows/nsDataObj.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include #include diff --git a/widget/windows/nsDeviceContextSpecWin.cpp b/widget/windows/nsDeviceContextSpecWin.cpp index b68c52fe196..630f5a63af7 100644 --- a/widget/windows/nsDeviceContextSpecWin.cpp +++ b/widget/windows/nsDeviceContextSpecWin.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsDeviceContextSpecWin.h" #include "prmem.h" diff --git a/widget/windows/nsUXThemeData.cpp b/widget/windows/nsUXThemeData.cpp index c803dbafa73..ef50c30d96c 100644 --- a/widget/windows/nsUXThemeData.cpp +++ b/widget/windows/nsUXThemeData.cpp @@ -5,7 +5,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/WindowsVersion.h" #include "nsUXThemeData.h" diff --git a/widget/xpwidgets/GfxDriverInfo.h b/widget/xpwidgets/GfxDriverInfo.h index 784bf055354..8ee183ff7d2 100644 --- a/widget/xpwidgets/GfxDriverInfo.h +++ b/widget/xpwidgets/GfxDriverInfo.h @@ -6,7 +6,7 @@ #ifndef __mozilla_widget_GfxDriverInfo_h__ #define __mozilla_widget_GfxDriverInfo_h__ -#include "mozilla/Util.h" // ArrayLength +#include "mozilla/ArrayUtils.h" // ArrayLength #include "nsString.h" // Macros for adding a blocklist item to the static list. diff --git a/widget/xpwidgets/GfxInfoBase.cpp b/widget/xpwidgets/GfxInfoBase.cpp index 8a77a6549da..137d8fdd8e5 100644 --- a/widget/xpwidgets/GfxInfoBase.cpp +++ b/widget/xpwidgets/GfxInfoBase.cpp @@ -5,7 +5,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "GfxInfoBase.h" diff --git a/widget/xpwidgets/nsBaseWidget.cpp b/widget/xpwidgets/nsBaseWidget.cpp index 8e6b11899b2..5e14b5ceea4 100644 --- a/widget/xpwidgets/nsBaseWidget.cpp +++ b/widget/xpwidgets/nsBaseWidget.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/layers/CompositorChild.h" #include "mozilla/layers/CompositorParent.h" diff --git a/widget/xpwidgets/nsClipboardPrivacyHandler.cpp b/widget/xpwidgets/nsClipboardPrivacyHandler.cpp index 09e96db72ad..0285d50e9d6 100644 --- a/widget/xpwidgets/nsClipboardPrivacyHandler.cpp +++ b/widget/xpwidgets/nsClipboardPrivacyHandler.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsClipboardPrivacyHandler.h" #include "nsITransferable.h" diff --git a/widget/xpwidgets/nsXPLookAndFeel.cpp b/widget/xpwidgets/nsXPLookAndFeel.cpp index 532ba79bf94..d3927954bdf 100644 --- a/widget/xpwidgets/nsXPLookAndFeel.cpp +++ b/widget/xpwidgets/nsXPLookAndFeel.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nscore.h" diff --git a/xpcom/base/nsCycleCollector.cpp b/xpcom/base/nsCycleCollector.cpp index 62720800cd8..16d9a02684d 100644 --- a/xpcom/base/nsCycleCollector.cpp +++ b/xpcom/base/nsCycleCollector.cpp @@ -129,11 +129,11 @@ #include "base/process_util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/AutoRestore.h" #include "mozilla/CycleCollectedJSRuntime.h" /* This must occur *after* base/process_util.h to avoid typedefs conflicts. */ #include "mozilla/MemoryReporting.h" -#include "mozilla/Util.h" #include "mozilla/LinkedList.h" #include "nsCycleCollectionParticipant.h" diff --git a/xpcom/base/nsStackWalk.cpp b/xpcom/base/nsStackWalk.cpp index b1aaa0d368d..b5441871f22 100644 --- a/xpcom/base/nsStackWalk.cpp +++ b/xpcom/base/nsStackWalk.cpp @@ -177,7 +177,7 @@ StackWalkInitCriticalAddress() #include #include #include "plstr.h" -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nspr.h" #include diff --git a/xpcom/base/nsSystemInfo.cpp b/xpcom/base/nsSystemInfo.cpp index 18efc550420..cc0acf665e3 100644 --- a/xpcom/base/nsSystemInfo.cpp +++ b/xpcom/base/nsSystemInfo.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsSystemInfo.h" #include "prsystem.h" diff --git a/xpcom/build/PoisonIOInterposerMac.cpp b/xpcom/build/PoisonIOInterposerMac.cpp index 5f8ffdd23cc..0b92ef6c4e1 100644 --- a/xpcom/build/PoisonIOInterposerMac.cpp +++ b/xpcom/build/PoisonIOInterposerMac.cpp @@ -7,6 +7,7 @@ #include "PoisonIOInterposer.h" #include "mach_override.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Assertions.h" #include "mozilla/DebugOnly.h" #include "mozilla/IOInterposer.h" @@ -14,7 +15,6 @@ #include "mozilla/ProcessedStack.h" #include "mozilla/Scoped.h" #include "mozilla/Telemetry.h" -#include "mozilla/Util.h" #include "nsPrintfCString.h" #include "nsStackWalk.h" #include "nsTraceRefcntImpl.h" diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp index 9cff5a4352e..95a96534f54 100644 --- a/xpcom/components/ManifestParser.cpp +++ b/xpcom/components/ManifestParser.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "ManifestParser.h" diff --git a/xpcom/io/nsDirectoryService.cpp b/xpcom/io/nsDirectoryService.cpp index ce6cbd4a14d..aa1640d7f0a 100644 --- a/xpcom/io/nsDirectoryService.cpp +++ b/xpcom/io/nsDirectoryService.cpp @@ -4,7 +4,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsAutoPtr.h" diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp index ed137c29d19..1607c3dfac8 100644 --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp @@ -7,7 +7,7 @@ * Implementation of nsIFile for "unixy" systems. */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" #include diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index a0176bfb7b1..6c5d736eca6 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -3,8 +3,8 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" -#include "mozilla/Util.h" #include "mozilla/WindowsVersion.h" #include "nsCOMPtr.h" diff --git a/xpcom/tests/TestAtoms.cpp b/xpcom/tests/TestAtoms.cpp index 4688929eaab..7da8f4c1721 100644 --- a/xpcom/tests/TestAtoms.cpp +++ b/xpcom/tests/TestAtoms.cpp @@ -3,7 +3,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsIAtom.h" #include "nsString.h" diff --git a/xpcom/tests/TestDeadlockDetector.cpp b/xpcom/tests/TestDeadlockDetector.cpp index f2e725d738a..4a5e0b19330 100644 --- a/xpcom/tests/TestDeadlockDetector.cpp +++ b/xpcom/tests/TestDeadlockDetector.cpp @@ -4,7 +4,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "prenv.h" #include "prerror.h" diff --git a/xpcom/tests/TestHarness.h b/xpcom/tests/TestHarness.h index a29cf2d9392..9a24dbc9ff2 100644 --- a/xpcom/tests/TestHarness.h +++ b/xpcom/tests/TestHarness.h @@ -20,7 +20,7 @@ #define STATIC_JS_API #endif -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "prenv.h" #include "nsComponentManagerUtils.h" diff --git a/xpcom/tests/TestTArray.cpp b/xpcom/tests/TestTArray.cpp index 42c752452cf..e4cac3c84d2 100644 --- a/xpcom/tests/TestTArray.cpp +++ b/xpcom/tests/TestTArray.cpp @@ -4,7 +4,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include #include diff --git a/xpcom/tests/TestUTF.cpp b/xpcom/tests/TestUTF.cpp index 7f1effdb761..54bf178c188 100644 --- a/xpcom/tests/TestUTF.cpp +++ b/xpcom/tests/TestUTF.cpp @@ -2,7 +2,7 @@ * 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 "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include #include diff --git a/xpcom/threads/BackgroundHangMonitor.cpp b/xpcom/threads/BackgroundHangMonitor.cpp index a56b34bea87..966f3aec9b9 100644 --- a/xpcom/threads/BackgroundHangMonitor.cpp +++ b/xpcom/threads/BackgroundHangMonitor.cpp @@ -3,6 +3,7 @@ * 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 "mozilla/ArrayUtils.h" #include "mozilla/BackgroundHangMonitor.h" #include "mozilla/LinkedList.h" #include "mozilla/Monitor.h" diff --git a/xpcom/threads/nsProcessCommon.cpp b/xpcom/threads/nsProcessCommon.cpp index 9d992c7b652..66d073875e1 100644 --- a/xpcom/threads/nsProcessCommon.cpp +++ b/xpcom/threads/nsProcessCommon.cpp @@ -11,7 +11,7 @@ ***************************************************************************** */ -#include "mozilla/Util.h" +#include "mozilla/ArrayUtils.h" #include "nsCOMPtr.h" #include "nsAutoPtr.h" From bdda80d8b8018f7fcfaca4bf0ace15df3a0cf9a3 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sun, 8 Dec 2013 21:53:11 -0500 Subject: [PATCH 17/25] Bug 798033 - Remove 'using namespace' from dom/ headers. r=echou --- dom/bluetooth/BluetoothSocketObserver.h | 9 ++++----- dom/bluetooth/bluedroid/BluetoothOppManager.h | 3 ++- dom/bluetooth/bluez/BluetoothHfpManager.h | 2 +- dom/bluetooth/bluez/BluetoothOppManager.h | 3 ++- dom/system/gonk/AudioManager.h | 2 -- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/dom/bluetooth/BluetoothSocketObserver.h b/dom/bluetooth/BluetoothSocketObserver.h index 09584241f95..6a2d6f89bad 100644 --- a/dom/bluetooth/BluetoothSocketObserver.h +++ b/dom/bluetooth/BluetoothSocketObserver.h @@ -8,9 +8,7 @@ #define mozilla_dom_bluetooth_BluetoothSocketObserver_h #include "BluetoothCommon.h" -#include - -using namespace mozilla::ipc; +#include "mozilla/ipc/UnixSocket.h" BEGIN_BLUETOOTH_NAMESPACE @@ -19,8 +17,9 @@ class BluetoothSocket; class BluetoothSocketObserver { public: - virtual void ReceiveSocketData(BluetoothSocket* aSocket, - nsAutoPtr& aMessage) = 0; + virtual void ReceiveSocketData( + BluetoothSocket* aSocket, + nsAutoPtr& aMessage) = 0; /** * A callback function which would be called when a socket connection diff --git a/dom/bluetooth/bluedroid/BluetoothOppManager.h b/dom/bluetooth/bluedroid/BluetoothOppManager.h index 0642c2457ce..782c1a37ce1 100644 --- a/dom/bluetooth/bluedroid/BluetoothOppManager.h +++ b/dom/bluetooth/bluedroid/BluetoothOppManager.h @@ -115,7 +115,8 @@ private: * false if the received length exceeds/not reaches the expected * length. */ - bool ComposePacket(uint8_t aOpCode, UnixSocketRawData* aMessage); + bool ComposePacket(uint8_t aOpCode, + mozilla::ipc::UnixSocketRawData* aMessage); /** * OBEX session status. diff --git a/dom/bluetooth/bluez/BluetoothHfpManager.h b/dom/bluetooth/bluez/BluetoothHfpManager.h index 91f78c6cd99..f44cb194634 100644 --- a/dom/bluetooth/bluez/BluetoothHfpManager.h +++ b/dom/bluetooth/bluez/BluetoothHfpManager.h @@ -222,7 +222,7 @@ private: nsRefPtr mHandsfreeSocket; nsRefPtr mHeadsetSocket; nsRefPtr mScoSocket; - SocketConnectionStatus mScoSocketStatus; + mozilla::ipc::SocketConnectionStatus mScoSocketStatus; #ifdef MOZ_B2G_RIL // CDMA-specific variable diff --git a/dom/bluetooth/bluez/BluetoothOppManager.h b/dom/bluetooth/bluez/BluetoothOppManager.h index 062032ac69d..c2db9e5e264 100644 --- a/dom/bluetooth/bluez/BluetoothOppManager.h +++ b/dom/bluetooth/bluez/BluetoothOppManager.h @@ -115,7 +115,8 @@ private: * false if the received length exceeds/not reaches the expected * length. */ - bool ComposePacket(uint8_t aOpCode, UnixSocketRawData* aMessage); + bool ComposePacket(uint8_t aOpCode, + mozilla::ipc::UnixSocketRawData* aMessage); /** * OBEX session status. diff --git a/dom/system/gonk/AudioManager.h b/dom/system/gonk/AudioManager.h index bd0649f390e..5d71bccff38 100644 --- a/dom/system/gonk/AudioManager.h +++ b/dom/system/gonk/AudioManager.h @@ -28,8 +28,6 @@ {0x89, 0x10, 0xf9, 0x3c, 0x55, 0xe6, 0x62, 0xec}} #define NS_AUDIOMANAGER_CONTRACTID "@mozilla.org/telephony/audiomanager;1" -using namespace mozilla::dom; - namespace mozilla { namespace hal { class SwitchEvent; From 4fc8d6dc8685fbd7852fd959e887cb0117fc465b Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sun, 8 Dec 2013 21:53:26 -0500 Subject: [PATCH 18/25] Bug 798033 - Remove 'using namespace' from gfx/ headers. r=jrmuizel --- gfx/layers/CopyableCanvasLayer.h | 5 ++--- gfx/layers/basic/BasicCanvasLayer.h | 1 - gfx/layers/client/CanvasClient.cpp | 1 + gfx/layers/client/ClientCanvasLayer.cpp | 1 + gfx/layers/client/ClientCanvasLayer.h | 2 -- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/gfx/layers/CopyableCanvasLayer.h b/gfx/layers/CopyableCanvasLayer.h index 07f7aae9ad7..c2e0257cf94 100644 --- a/gfx/layers/CopyableCanvasLayer.h +++ b/gfx/layers/CopyableCanvasLayer.h @@ -22,8 +22,6 @@ #include "nsAutoPtr.h" // for nsRefPtr #include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc -using namespace mozilla::gfx; - namespace mozilla { namespace layers { @@ -49,7 +47,8 @@ protected: Layer* aMaskLayer, gfxContext::GraphicsOperator aOperator = gfxContext::OPERATOR_OVER); - void UpdateSurface(gfxASurface* aDestSurface = nullptr, Layer* aMaskLayer = nullptr); + void UpdateSurface(gfxASurface* aDestSurface = nullptr, + Layer* aMaskLayer = nullptr); nsRefPtr mSurface; nsRefPtr mGLContext; diff --git a/gfx/layers/basic/BasicCanvasLayer.h b/gfx/layers/basic/BasicCanvasLayer.h index 1d8f3167d2c..3dd3ae8280b 100644 --- a/gfx/layers/basic/BasicCanvasLayer.h +++ b/gfx/layers/basic/BasicCanvasLayer.h @@ -14,7 +14,6 @@ #include "nsRegion.h" // for nsIntRegion class gfxContext; -using namespace mozilla::gfx; namespace mozilla { namespace layers { diff --git a/gfx/layers/client/CanvasClient.cpp b/gfx/layers/client/CanvasClient.cpp index 38585e3c54e..43db6d9de9d 100644 --- a/gfx/layers/client/CanvasClient.cpp +++ b/gfx/layers/client/CanvasClient.cpp @@ -24,6 +24,7 @@ #include "SharedSurfaceGralloc.h" #endif +using namespace mozilla::gfx; using namespace mozilla::gl; namespace mozilla { diff --git a/gfx/layers/client/ClientCanvasLayer.cpp b/gfx/layers/client/ClientCanvasLayer.cpp index 81f3ed08baa..a194c54b4c3 100644 --- a/gfx/layers/client/ClientCanvasLayer.cpp +++ b/gfx/layers/client/ClientCanvasLayer.cpp @@ -26,6 +26,7 @@ #include "SharedSurfaceIO.h" #endif +using namespace mozilla::gfx; using namespace mozilla::gl; namespace mozilla { diff --git a/gfx/layers/client/ClientCanvasLayer.h b/gfx/layers/client/ClientCanvasLayer.h index 707a20e1d06..6af3f430fd6 100644 --- a/gfx/layers/client/ClientCanvasLayer.h +++ b/gfx/layers/client/ClientCanvasLayer.h @@ -19,8 +19,6 @@ #include "nsRegion.h" // for nsIntRegion #include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc -using namespace mozilla::gfx; - namespace mozilla { namespace layers { From 28919a5971b8ed87434b39f5f45a9af3b8b84666 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sun, 8 Dec 2013 21:53:46 -0500 Subject: [PATCH 19/25] Bug 798033 - Remove 'using namespace' from toolkit/ headers. r=bsmedberg --- toolkit/components/alerts/nsXULAlerts.cpp | 2 ++ toolkit/components/alerts/nsXULAlerts.h | 2 -- toolkit/components/build/nsToolkitCompsModule.cpp | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/toolkit/components/alerts/nsXULAlerts.cpp b/toolkit/components/alerts/nsXULAlerts.cpp index a8bd65a086d..29b9f2b6cbb 100644 --- a/toolkit/components/alerts/nsXULAlerts.cpp +++ b/toolkit/components/alerts/nsXULAlerts.cpp @@ -13,6 +13,8 @@ #include "nsPIDOMWindow.h" #include "nsIWindowWatcher.h" +using namespace mozilla; + #define ALERT_CHROME_URL "chrome://global/content/alerts/alert.xul" NS_IMPL_ISUPPORTS1(nsXULAlertObserver, nsIObserver) diff --git a/toolkit/components/alerts/nsXULAlerts.h b/toolkit/components/alerts/nsXULAlerts.h index 8092424f260..62fe3b6fbd0 100644 --- a/toolkit/components/alerts/nsXULAlerts.h +++ b/toolkit/components/alerts/nsXULAlerts.h @@ -12,8 +12,6 @@ #include "nsIDOMWindow.h" #include "nsIObserver.h" -using namespace mozilla; - class nsXULAlerts { friend class nsXULAlertObserver; public: diff --git a/toolkit/components/build/nsToolkitCompsModule.cpp b/toolkit/components/build/nsToolkitCompsModule.cpp index ed2dbece42b..b0cbf16aa94 100644 --- a/toolkit/components/build/nsToolkitCompsModule.cpp +++ b/toolkit/components/build/nsToolkitCompsModule.cpp @@ -36,6 +36,8 @@ #include "nsBrowserStatusFilter.h" #include "mozilla/FinalizationWitnessService.h" +using namespace mozilla; + ///////////////////////////////////////////////////////////////////////////// NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAppStartup, Init) @@ -113,7 +115,7 @@ NS_DEFINE_NAMED_CID(NS_UPDATEPROCESSOR_CID); #endif NS_DEFINE_NAMED_CID(FINALIZATIONWITNESSSERVICE_CID); -static const mozilla::Module::CIDEntry kToolkitCIDs[] = { +static const Module::CIDEntry kToolkitCIDs[] = { { &kNS_TOOLKIT_APPSTARTUP_CID, false, nullptr, nsAppStartupConstructor }, { &kNS_USERINFO_CID, false, nullptr, nsUserInfoConstructor }, { &kNS_ALERTSSERVICE_CID, false, nullptr, nsAlertsServiceConstructor }, @@ -141,7 +143,7 @@ static const mozilla::Module::CIDEntry kToolkitCIDs[] = { { nullptr } }; -static const mozilla::Module::ContractIDEntry kToolkitContracts[] = { +static const Module::ContractIDEntry kToolkitContracts[] = { { NS_APPSTARTUP_CONTRACTID, &kNS_TOOLKIT_APPSTARTUP_CID }, { NS_USERINFO_CONTRACTID, &kNS_USERINFO_CID }, { NS_ALERTSERVICE_CONTRACTID, &kNS_ALERTSSERVICE_CID }, @@ -170,8 +172,8 @@ static const mozilla::Module::ContractIDEntry kToolkitContracts[] = { { nullptr } }; -static const mozilla::Module kToolkitModule = { - mozilla::Module::kVersion, +static const Module kToolkitModule = { + Module::kVersion, kToolkitCIDs, kToolkitContracts }; From b192b55c0a8c843833e99c08103c639d1ed547cd Mon Sep 17 00:00:00 2001 From: Douglas Crosher Date: Fri, 6 Dec 2013 23:00:31 +1100 Subject: [PATCH 20/25] Bug 861785 - Odinmonkey ARM: use the hard-float ABI for inter-asm.js function calls irrespective of the system ABI. r=luke --- js/src/jit/AsmJS.cpp | 24 ------------------ js/src/jit/CodeGenerator.cpp | 28 ++++++--------------- js/src/jit/arm/Assembler-arm.cpp | 39 ++---------------------------- js/src/jit/arm/Assembler-arm.h | 4 --- js/src/jit/arm/CodeGenerator-arm.h | 7 +++--- 5 files changed, 14 insertions(+), 88 deletions(-) diff --git a/js/src/jit/AsmJS.cpp b/js/src/jit/AsmJS.cpp index 4f21e60dba6..00a35835982 100644 --- a/js/src/jit/AsmJS.cpp +++ b/js/src/jit/AsmJS.cpp @@ -5598,12 +5598,7 @@ GenerateEntry(ModuleCompiler &m, const AsmJSModule::ExportedFunction &exportedFu masm.load32(src, iter->gpr()); break; case ABIArg::FPU: -#if defined(JS_CPU_ARM) and !defined(JS_CPU_ARM_HARDFP) - masm.ma_dataTransferN(IsLoad, 64, true, argv, Imm32(argOffset), - Register::FromCode(iter->fpu().code()*2)); -#else masm.loadDouble(src, iter->fpu()); -#endif break; case ABIArg::Stack: if (iter.mirType() == MIRType_Int32) { @@ -5635,9 +5630,6 @@ GenerateEntry(ModuleCompiler &m, const AsmJSModule::ExportedFunction &exportedFu masm.storeValue(JSVAL_TYPE_INT32, ReturnReg, Address(argv, 0)); break; case RetType::Double: -#if defined(JS_CPU_ARM) and !defined(JS_CPU_ARM_HARDFP) - masm.ma_vxfer(r0, r1, d0); -#endif masm.canonicalizeDouble(ReturnFloatReg); masm.storeDouble(ReturnFloatReg, Address(argv, 0)); break; @@ -5770,11 +5762,6 @@ FillArgumentArray(ModuleCompiler &m, const VarTypeVector &argTypes, masm.storeValue(JSVAL_TYPE_INT32, i->gpr(), dstAddr); break; case ABIArg::FPU: { -#if defined(JS_CPU_ARM) && !defined(JS_CPU_ARM_HARDFP) - FloatRegister fr = i->fpu(); - int srcId = fr.code() * 2; - masm.ma_vxfer(Register::FromCode(srcId), Register::FromCode(srcId+1), fr); -#endif masm.canonicalizeDouble(i->fpu()); masm.storeDouble(i->fpu(), dstAddr); break; @@ -5935,11 +5922,7 @@ GenerateFFIInterpreterExit(ModuleCompiler &m, const ModuleCompiler::ExitDescript case RetType::Double: masm.call(AsmJSImm_InvokeFromAsmJS_ToNumber); masm.branchTest32(Assembler::Zero, ReturnReg, ReturnReg, throwLabel); -#if defined(JS_CPU_ARM) && !defined(JS_CPU_ARM_HARDFP) - masm.loadValue(argv, softfpReturnOperand); -#else masm.loadDouble(argv, ReturnFloatReg); -#endif break; } @@ -6005,11 +5988,7 @@ GenerateOOLConvert(ModuleCompiler &m, RetType retType, Label *throwLabel) case RetType::Double: masm.call(AsmJSImm_CoerceInPlace_ToNumber); masm.branchTest32(Assembler::Zero, ReturnReg, ReturnReg, throwLabel); -#if defined(JS_CPU_ARM) && !defined(JS_CPU_ARM_HARDFP) - masm.loadValue(Address(StackPointer, offsetToArgv), softfpReturnOperand); -#else masm.loadDouble(Address(StackPointer, offsetToArgv), ReturnFloatReg); -#endif break; default: MOZ_ASSUME_UNREACHABLE("Unsupported convert type"); @@ -6148,9 +6127,6 @@ GenerateFFIIonExit(ModuleCompiler &m, const ModuleCompiler::ExitDescriptor &exit break; case RetType::Double: masm.convertValueToDouble(JSReturnOperand, ReturnFloatReg, &oolConvert); -#if defined(JS_CPU_ARM) && !defined(JS_CPU_ARM_HARDFP) - masm.boxDouble(ReturnFloatReg, softfpReturnOperand); -#endif break; } diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp index 9e791cb7d86..17f7263ec92 100644 --- a/js/src/jit/CodeGenerator.cpp +++ b/js/src/jit/CodeGenerator.cpp @@ -7685,12 +7685,14 @@ CodeGenerator::visitAsmJSCall(LAsmJSCall *ins) MAsmJSCall *mir = ins->mir(); #if defined(JS_CPU_ARM) && !defined(JS_CPU_ARM_HARDFP) - for (unsigned i = 0, e = ins->numOperands(); i < e; i++) { - LAllocation *a = ins->getOperand(i); - if (a->isFloatReg()) { - FloatRegister fr = ToFloatRegister(a); - int srcId = fr.code() * 2; - masm.ma_vxfer(fr, Register::FromCode(srcId), Register::FromCode(srcId+1)); + if (mir->callee().which() == MAsmJSCall::Callee::Builtin) { + for (unsigned i = 0, e = ins->numOperands(); i < e; i++) { + LAllocation *a = ins->getOperand(i); + if (a->isFloatReg()) { + FloatRegister fr = ToFloatRegister(a); + int srcId = fr.code() * 2; + masm.ma_vxfer(fr, Register::FromCode(srcId), Register::FromCode(srcId+1)); + } } } #endif @@ -7730,16 +7732,6 @@ CodeGenerator::visitAsmJSCall(LAsmJSCall *ins) bool CodeGenerator::visitAsmJSParameter(LAsmJSParameter *lir) { -#if defined(JS_CPU_ARM) && !defined(JS_CPU_ARM_HARDFP) - // softfp transfers some double values in gprs. - // undo this. - LAllocation *a = lir->getDef(0)->output(); - if (a->isFloatReg()) { - FloatRegister fr = ToFloatRegister(a); - int srcId = fr.code() * 2; - masm.ma_vxfer(Register::FromCode(srcId), Register::FromCode(srcId+1), fr); - } -#endif return true; } @@ -7747,10 +7739,6 @@ bool CodeGenerator::visitAsmJSReturn(LAsmJSReturn *lir) { // Don't emit a jump to the return label if this is the last block. -#if defined(JS_CPU_ARM) && !defined(JS_CPU_ARM_HARDFP) - if (lir->getOperand(0)->isFloatReg()) - masm.ma_vxfer(d0, r0, r1); -#endif if (current->mir() != *gen->graph().poBegin()) masm.jump(&returnLabel_); return true; diff --git a/js/src/jit/arm/Assembler-arm.cpp b/js/src/jit/arm/Assembler-arm.cpp index c5c56de4908..a44225a1309 100644 --- a/js/src/jit/arm/Assembler-arm.cpp +++ b/js/src/jit/arm/Assembler-arm.cpp @@ -22,13 +22,11 @@ using namespace js::jit; using mozilla::CountLeadingZeroes32; +// Note this is used for inter-AsmJS calls and may pass arguments and results +// in floating point registers even if the system ABI does not. ABIArgGenerator::ABIArgGenerator() : -#if defined(JS_CPU_ARM_HARDFP) intRegIndex_(0), floatRegIndex_(0), -#else - argRegIndex_(0), -#endif stackOffset_(0), current_() {} @@ -36,7 +34,6 @@ ABIArgGenerator::ABIArgGenerator() : ABIArg ABIArgGenerator::next(MIRType type) { -#if defined(JS_CPU_ARM_HARDFP) switch (type) { case MIRType_Int32: case MIRType_Pointer: @@ -62,40 +59,8 @@ ABIArgGenerator::next(MIRType type) default: MOZ_ASSUME_UNREACHABLE("Unexpected argument type"); } - return current_; -#else - switch (type) { - case MIRType_Int32: - case MIRType_Pointer: - if (argRegIndex_ == NumIntArgRegs) { - current_ = ABIArg(stackOffset_); - stackOffset_ += sizeof(uint32_t); - break; - } - current_ = ABIArg(Register::FromCode(argRegIndex_)); - argRegIndex_++; - break; - case MIRType_Double: { - unsigned alignedArgRegIndex_ = (argRegIndex_ + 1) & ~1; - if (alignedArgRegIndex_ + 1 > NumIntArgRegs) { - static const int align = sizeof(double) - 1; - stackOffset_ = (stackOffset_ + align) & ~align; - current_ = ABIArg(stackOffset_); - stackOffset_ += sizeof(uint64_t); - argRegIndex_ = NumIntArgRegs; - break; - } - argRegIndex_ = alignedArgRegIndex_; - current_ = ABIArg(FloatRegister::FromCode(argRegIndex_ >> 1)); - argRegIndex_+=2; - } - break; - default: - MOZ_ASSUME_UNREACHABLE("Unexpected argument type"); - } return current_; -#endif } const Register ABIArgGenerator::NonArgReturnVolatileReg0 = r4; const Register ABIArgGenerator::NonArgReturnVolatileReg1 = r5; diff --git a/js/src/jit/arm/Assembler-arm.h b/js/src/jit/arm/Assembler-arm.h index f364551e96a..d7909003970 100644 --- a/js/src/jit/arm/Assembler-arm.h +++ b/js/src/jit/arm/Assembler-arm.h @@ -68,12 +68,8 @@ static const uint32_t NumCallTempNonArgRegs = mozilla::ArrayLength(CallTempNonArgRegs); class ABIArgGenerator { -#if defined(JS_CPU_ARM_HARDFP) unsigned intRegIndex_; unsigned floatRegIndex_; -#else - unsigned argRegIndex_; -#endif uint32_t stackOffset_; ABIArg current_; diff --git a/js/src/jit/arm/CodeGenerator-arm.h b/js/src/jit/arm/CodeGenerator-arm.h index 712cafbfd1b..e9f43101016 100644 --- a/js/src/jit/arm/CodeGenerator-arm.h +++ b/js/src/jit/arm/CodeGenerator-arm.h @@ -177,11 +177,12 @@ class CodeGeneratorARM : public CodeGeneratorShared protected: void postAsmJSCall(LAsmJSCall *lir) { #if !defined(JS_CPU_ARM_HARDFP) - if (lir->mir()->type() == MIRType_Double) { - masm.ma_vxfer(r0, r1, d0); + if (lir->mir()->callee().which() == MAsmJSCall::Callee::Builtin) { + if (lir->mir()->type() == MIRType_Double) + masm.ma_vxfer(r0, r1, d0); } #endif -} + } bool visitEffectiveAddress(LEffectiveAddress *ins); bool visitUDiv(LUDiv *ins); From 6c0355a57f4ca2b1132c11e0cf352fb6cbe07362 Mon Sep 17 00:00:00 2001 From: Jeff Gilbert Date: Sun, 8 Dec 2013 21:56:40 -0500 Subject: [PATCH 21/25] Bug 942319 - Supply python script to convert some mochitests to standalone tests. r=bjacob --- .../test/webgl/non-conf-tests/driver-info.js | 87 ++++++++++++------- .../webgl/non-conf-tests/mochi-to-testcase.py | 86 ++++++++++++++++++ 2 files changed, 143 insertions(+), 30 deletions(-) create mode 100644 content/canvas/test/webgl/non-conf-tests/mochi-to-testcase.py diff --git a/content/canvas/test/webgl/non-conf-tests/driver-info.js b/content/canvas/test/webgl/non-conf-tests/driver-info.js index 83688176e39..d0c6aeb0ebb 100644 --- a/content/canvas/test/webgl/non-conf-tests/driver-info.js +++ b/content/canvas/test/webgl/non-conf-tests/driver-info.js @@ -18,9 +18,15 @@ DriverInfo = (function() { // --------------------------------------------------------------------------- // OS and driver identification // Stolen from content/canvas/test/webgl/test_webgl_conformance_test_suite.html - const Cc = SpecialPowers.Cc; - const Ci = SpecialPowers.Ci; function detectDriverInfo() { + try { + var cc = SpecialPowers.Cc; + } catch (e) { + throw 'No SpecialPowers!'; + } + + const Cc = SpecialPowers.Cc; + const Ci = SpecialPowers.Ci; var doc = Cc["@mozilla.org/xmlextras/domparser;1"].createInstance(Ci.nsIDOMParser).parseFromString("", "text/html"); var canvas = doc.createElement("canvas"); @@ -46,6 +52,51 @@ DriverInfo = (function() { return [webglVendor, webglRenderer]; } + function detectOSInfo() { + try { + var cc = SpecialPowers.Cc; + } catch (e) { + throw 'No SpecialPowers!'; + } + + const Cc = SpecialPowers.Cc; + const Ci = SpecialPowers.Ci; + + // From reftest.js: + var runtime = Cc['@mozilla.org/xre/app-info;1'].getService(Ci.nsIXULRuntime); + + var os = null; + var version = null; + if (navigator.platform.indexOf('Win') == 0) { + os = OS.WINDOWS; + + // code borrowed from browser/modules/test/browser_taskbar_preview.js + version = SpecialPowers.Services.sysinfo.getProperty('version'); + version = parseFloat(version); + // Version 6.0 is Vista, 6.1 is 7. + + } else if (navigator.platform.indexOf('Mac') == 0) { + os = OS.MAC; + + var versionMatch = /Mac OS X (\d+.\d+)/.exec(navigator.userAgent); + version = versionMatch ? parseFloat(versionMatch[1]) : null; + + } else if (runtime.widgetToolkit == 'gonk') { + os = OS.B2G; + + } else if (navigator.appVersion.indexOf('Android') != -1) { + os = OS.ANDROID; + // From layout/tools/reftest/reftest.js: + version = SpecialPowers.Services.sysinfo.getProperty('version'); + + } else if (navigator.platform.indexOf('Linux') == 0) { + // Must be checked after android, as android also has a 'Linux' platform string. + os = OS.LINUX; + } + + return [os, version]; + } + var OS = { WINDOWS: 'windows', MAC: 'mac', @@ -65,34 +116,10 @@ DriverInfo = (function() { var kOSVersion = null; var kDriver = null; - // From reftest.js: - var runtime = Cc['@mozilla.org/xre/app-info;1'].getService(Ci.nsIXULRuntime); - - if (navigator.platform.indexOf('Win') == 0) { - kOS = OS.WINDOWS; - - // code borrowed from browser/modules/test/browser_taskbar_preview.js - var version = SpecialPowers.Services.sysinfo.getProperty('version'); - kOSVersion = parseFloat(version); - // Version 6.0 is Vista, 6.1 is 7. - - } else if (navigator.platform.indexOf('Mac') == 0) { - kOS = OS.MAC; - - var versionMatch = /Mac OS X (\d+.\d+)/.exec(navigator.userAgent); - kOSVersion = versionMatch ? parseFloat(versionMatch[1]) : null; - - } else if (runtime.widgetToolkit == 'gonk') { - kOS = OS.B2G; - - } else if (navigator.appVersion.indexOf('Android') != -1) { - kOS = OS.ANDROID; - // From layout/tools/reftest/reftest.js: - kOSVersion = SpecialPowers.Services.sysinfo.getProperty('version'); - - } else if (navigator.platform.indexOf('Linux') == 0) { - // Must be checked after android, as android also has a 'Linux' platform string. - kOS = OS.LINUX; + try { + [kOS, kOSVersion] = detectOSInfo(); + } catch (e) { + // Generally just fails when we don't have SpecialPowers. } try { diff --git a/content/canvas/test/webgl/non-conf-tests/mochi-to-testcase.py b/content/canvas/test/webgl/non-conf-tests/mochi-to-testcase.py new file mode 100644 index 00000000000..56ac24e37b6 --- /dev/null +++ b/content/canvas/test/webgl/non-conf-tests/mochi-to-testcase.py @@ -0,0 +1,86 @@ +import sys +import os.path +import re + +assert len(sys.argv) == 2 +mochiPath = sys.argv[1] + +extDotPos = mochiPath.find('.html') +assert extDotPos != -1, 'mochitest target must be an html doc.' + +testPath = mochiPath[:extDotPos] + '.solo.html' + +def ReadLocalFile(include): + incPath = os.path.dirname(mochiPath) + filePath = os.path.join(incPath, include) + + data = None + try: + f = open(filePath, 'r') + data = f.read() + except: + pass + + try: + f.close() + except: + pass + + return data + +kSimpleTestReplacement = '''\n + +
+\n''' + +fin = open(mochiPath, 'r') +fout = open(testPath, 'w') +includePattern = re.compile('\\s*') +cssPattern = re.compile(']*)[\'"]>') +for line in fin: + skipLine = False + for css in cssPattern.findall(line): + skipLine = True + print('Ignoring stylesheet: ' + css) + + for inc in includePattern.findall(line): + skipLine = True + if inc == '/MochiKit/MochiKit': + continue + + if inc == '/tests/SimpleTest/SimpleTest': + print('Injecting SimpleTest replacement') + fout.write(kSimpleTestReplacement); + continue + + incData = ReadLocalFile(inc + '.js') + if not incData: + print('Warning: Unknown JS file ignored: ' + inc + '.js') + continue + + print('Injecting include: ' + inc + '.js') + fout.write('\n\n'); + continue + + if skipLine: + continue + + fout.write(line) + continue + +fin.close() +fout.close() From f5fc7c763318698d752dc7048fddb05d906ce5ca Mon Sep 17 00:00:00 2001 From: Isura Edirisinghe Date: Sun, 8 Dec 2013 21:57:00 -0500 Subject: [PATCH 22/25] Bug 944162 - Added assertIsPixel and assertIsNotPixel wrappers to AssertionHelper.java. r=mcomella --- mobile/android/base/tests/helpers/AssertionHelper.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mobile/android/base/tests/helpers/AssertionHelper.java b/mobile/android/base/tests/helpers/AssertionHelper.java index 7da1c86327c..cd0de20b201 100644 --- a/mobile/android/base/tests/helpers/AssertionHelper.java +++ b/mobile/android/base/tests/helpers/AssertionHelper.java @@ -7,7 +7,6 @@ package org.mozilla.gecko.tests.helpers; import org.mozilla.gecko.Assert; import org.mozilla.gecko.tests.UITestContext; -// TODO: Add ispixel assertions. /** * Provides assertions in a JUnit-like API that wraps the robocop Assert interface. */ @@ -47,6 +46,14 @@ public final class AssertionHelper { sAsserter.ok(actual, message, DIAG_STRING); } + public static void assertIsPixel(final string message, final int actual, final int r, final int g, final int b) { + sAsserter.ispixel(actual, r, g, b, message); + } + + public static void assertIsNotPixel(final string message, final int actual, final int r, final int g, final int b) { + sAsserter.isnotpixel(actual, r, g, b, message); + } + public static void fail(final String message) { sAsserter.ok(false, message, DIAG_STRING); } From 3502103ae74c497bdccaa96b1b86d0b8d500421d Mon Sep 17 00:00:00 2001 From: Chris Peterson Date: Thu, 5 Dec 2013 15:41:46 -0800 Subject: [PATCH 23/25] Bug 946998 - Initialize UDPSocketParent pointer to nullptr. r=jduell --- netwerk/ipc/NeckoParent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netwerk/ipc/NeckoParent.cpp b/netwerk/ipc/NeckoParent.cpp index cd1fa597ff8..77026520886 100644 --- a/netwerk/ipc/NeckoParent.cpp +++ b/netwerk/ipc/NeckoParent.cpp @@ -383,7 +383,7 @@ NeckoParent::AllocPUDPSocketParent(const nsCString& aHost, const uint16_t& aPort, const nsCString& aFilter) { - UDPSocketParent* p; + UDPSocketParent* p = nullptr; // Only allow socket if it specifies a valid packet filter. nsAutoCString contractId(NS_NETWORK_UDP_SOCKET_FILTER_HANDLER_PREFIX); From 1b64ad8751e58e9a0479a06b80fd1423681540a7 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Sun, 8 Dec 2013 22:49:50 -0500 Subject: [PATCH 24/25] Backed out changeset 97d17b777f68 (bug 944162) for Android bustage. --- mobile/android/base/tests/helpers/AssertionHelper.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/mobile/android/base/tests/helpers/AssertionHelper.java b/mobile/android/base/tests/helpers/AssertionHelper.java index cd0de20b201..7da1c86327c 100644 --- a/mobile/android/base/tests/helpers/AssertionHelper.java +++ b/mobile/android/base/tests/helpers/AssertionHelper.java @@ -7,6 +7,7 @@ package org.mozilla.gecko.tests.helpers; import org.mozilla.gecko.Assert; import org.mozilla.gecko.tests.UITestContext; +// TODO: Add ispixel assertions. /** * Provides assertions in a JUnit-like API that wraps the robocop Assert interface. */ @@ -46,14 +47,6 @@ public final class AssertionHelper { sAsserter.ok(actual, message, DIAG_STRING); } - public static void assertIsPixel(final string message, final int actual, final int r, final int g, final int b) { - sAsserter.ispixel(actual, r, g, b, message); - } - - public static void assertIsNotPixel(final string message, final int actual, final int r, final int g, final int b) { - sAsserter.isnotpixel(actual, r, g, b, message); - } - public static void fail(final String message) { sAsserter.ok(false, message, DIAG_STRING); } From 8986c76fb37d46fea930ffeea96c411dac759db6 Mon Sep 17 00:00:00 2001 From: Nicholas Cameron Date: Mon, 9 Dec 2013 17:44:57 +1300 Subject: [PATCH 25/25] Bug 946532. Setup translucent window drawing properly with OMTC. r=dvander, mattwoodrow --- widget/windows/nsWindow.cpp | 42 ++++++++++++++++++++++++++-------- widget/windows/nsWindow.h | 2 ++ widget/windows/nsWindowGfx.cpp | 4 ++-- 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index 6c350011bad..8ace248d409 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -3513,19 +3513,36 @@ mozilla::TemporaryRef nsWindow::StartRemoteDrawing() { MOZ_ASSERT(!mCompositeDC); + NS_ASSERTION(IsRenderMode(gfxWindowsPlatform::RENDER_DIRECT2D) || + IsRenderMode(gfxWindowsPlatform::RENDER_GDI), + "Unexpected render mode for remote drawing"); HDC dc = (HDC)GetNativeData(NS_NATIVE_GRAPHIC); - if (!dc) { - return nullptr; - } + nsRefPtr surf; - uint32_t flags = (mTransparencyMode == eTransparencyOpaque) ? 0 : - gfxWindowsSurface::FLAG_IS_TRANSPARENT; - nsRefPtr surf = new gfxWindowsSurface(dc, flags); + if (mTransparencyMode == eTransparencyTransparent) { + if (!mTransparentSurface) { + SetupTranslucentWindowMemoryBitmap(mTransparencyMode); + } + if (mTransparentSurface) { + surf = mTransparentSurface; + } + } + + if (!surf) { + if (!dc) { + return nullptr; + } + uint32_t flags = (mTransparencyMode == eTransparencyOpaque) ? 0 : + gfxWindowsSurface::FLAG_IS_TRANSPARENT; + surf = new gfxWindowsSurface(dc, flags); + } mozilla::gfx::IntSize size(surf->GetSize().width, surf->GetSize().height); if (size.width <= 0 || size.height <= 0) { - FreeNativeData(dc, NS_NATIVE_GRAPHIC); + if (dc) { + FreeNativeData(dc, NS_NATIVE_GRAPHIC); + } return nullptr; } @@ -3538,9 +3555,14 @@ nsWindow::StartRemoteDrawing() void nsWindow::EndRemoteDrawing() { - MOZ_ASSERT(mCompositeDC); - UpdateTranslucentWindow(); - FreeNativeData(mCompositeDC, NS_NATIVE_GRAPHIC); + if (mTransparencyMode == eTransparencyTransparent) { + MOZ_ASSERT(IsRenderMode(gfxWindowsPlatform::RENDER_DIRECT2D) + || mTransparentSurface); + UpdateTranslucentWindow(); + } + if (mCompositeDC) { + FreeNativeData(mCompositeDC, NS_NATIVE_GRAPHIC); + } mCompositeDC = nullptr; } diff --git a/widget/windows/nsWindow.h b/widget/windows/nsWindow.h index 697fc6990e5..3f0334fc815 100644 --- a/widget/windows/nsWindow.h +++ b/widget/windows/nsWindow.h @@ -18,6 +18,7 @@ #include "nsToolkit.h" #include "nsString.h" #include "nsTArray.h" +#include "gfxWindowsPlatform.h" #include "gfxWindowsSurface.h" #include "nsWindowDbg.h" #include "cairo.h" @@ -436,6 +437,7 @@ protected: static void ActivateOtherWindowHelper(HWND aWnd); void ClearCachedResources(); nsIWidgetListener* GetPaintListener(); + static bool IsRenderMode(gfxWindowsPlatform::RenderMode aMode); protected: nsCOMPtr mParent; diff --git a/widget/windows/nsWindowGfx.cpp b/widget/windows/nsWindowGfx.cpp index bec8f6d5b1b..c34e8759713 100644 --- a/widget/windows/nsWindowGfx.cpp +++ b/widget/windows/nsWindowGfx.cpp @@ -100,8 +100,8 @@ static IconMetrics sIconMetrics[] = { ************************************************************** **************************************************************/ -static bool -IsRenderMode(gfxWindowsPlatform::RenderMode rmode) +/* static */ bool +nsWindow::IsRenderMode(gfxWindowsPlatform::RenderMode rmode) { return gfxWindowsPlatform::GetPlatform()->GetRenderMode() == rmode; }