mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1602317 - Remove some useless includes. r=heycam
This intended to fix some windows builds, but that didn't end up working. This removes some unused members and such, and fixes some missing includes that they uncover (whoops). This was needed because some windows headers used in the sandbox redefine STRICT (which is used by `StyleContain`) and `TRANSPARENT`, which is used by some WR stuff. Differential Revision: https://phabricator.services.mozilla.com/D56317 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
1dc32f9c0f
commit
25987bb3e9
@ -13912,9 +13912,6 @@ void Document::DocAddSizeOfExcludingThis(nsWindowSizes& aWindowSizes) const {
|
||||
|
||||
mStyleSet->AddSizeOfIncludingThis(aWindowSizes);
|
||||
|
||||
aWindowSizes.mDOMOtherSize += mLangGroupFontPrefs.SizeOfExcludingThis(
|
||||
aWindowSizes.mState.mMallocSizeOf);
|
||||
|
||||
aWindowSizes.mPropertyTablesSize +=
|
||||
mPropertyTable.SizeOfExcludingThis(aWindowSizes.mState.mMallocSizeOf);
|
||||
|
||||
|
@ -42,7 +42,6 @@
|
||||
#include "nsURIHashKey.h"
|
||||
#include "mozilla/UseCounter.h"
|
||||
#include "mozilla/WeakPtr.h"
|
||||
#include "mozilla/StaticPresData.h"
|
||||
#include "Units.h"
|
||||
#include "nsContentListDeclarations.h"
|
||||
#include "nsExpirationTracker.h"
|
||||
@ -58,7 +57,6 @@
|
||||
#include "mozilla/LinkedList.h"
|
||||
#include "mozilla/NotNull.h"
|
||||
#include "mozilla/SegmentedVector.h"
|
||||
#include "mozilla/ServoBindingTypes.h"
|
||||
#include "mozilla/StyleSheet.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
@ -5287,13 +5285,6 @@ class Document : public nsINode,
|
||||
// resolution.
|
||||
nsTHashtable<nsPtrHashKey<SVGElement>> mLazySVGPresElements;
|
||||
|
||||
// Most documents will only use one (or very few) language groups. Rather
|
||||
// than have the overhead of a hash lookup, we simply look along what will
|
||||
// typically be a very short (usually of length 1) linked list. There are 31
|
||||
// language groups, so in the worst case scenario we'll need to traverse 31
|
||||
// link items.
|
||||
LangGroupFontPrefs mLangGroupFontPrefs;
|
||||
|
||||
nsTHashtable<nsRefPtrHashKey<nsAtom>> mLanguagesUsed;
|
||||
|
||||
// TODO(emilio): Is this hot enough to warrant to be cached?
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "mozilla/CycleCollectedJSContext.h"
|
||||
#include "mozilla/dom/SimpleGlobalObject.h"
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef _mozilla_dom_Client_h
|
||||
#define _mozilla_dom_Client_h
|
||||
|
||||
#include "X11UndefineNone.h"
|
||||
#include "mozilla/dom/ClientBinding.h"
|
||||
#include "mozilla/StorageAccess.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "ipc/IPCMessageUtils.h"
|
||||
|
||||
#include "X11UndefineNone.h"
|
||||
#include "mozilla/dom/ClientBinding.h"
|
||||
#include "mozilla/dom/ClientsBinding.h"
|
||||
#include "mozilla/dom/DocumentBinding.h"
|
||||
|
@ -7,6 +7,7 @@
|
||||
#ifndef _mozilla_dom_ClientInfo_h
|
||||
#define _mozilla_dom_ClientInfo_h
|
||||
|
||||
#include "X11UndefineNone.h"
|
||||
#include "mozilla/dom/ClientBinding.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "nsIAsyncInputStream.h"
|
||||
#include "nsIAsyncOutputStream.h"
|
||||
#include "nsIPipe.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsStreamUtils.h"
|
||||
#include "nsStringStream.h"
|
||||
|
||||
|
@ -12,7 +12,9 @@
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/dom/PromiseNativeHandler.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsRefPtrHashtable.h"
|
||||
#include "nsWrapperCache.h"
|
||||
|
||||
class nsIGlobalObject;
|
||||
class nsQueryActor;
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsIRequest.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsIProgressEventSink.h"
|
||||
#include "nsIHttpHeaderVisitor.h"
|
||||
|
@ -7,7 +7,6 @@
|
||||
#ifndef __GFXMESSAGEUTILS_H__
|
||||
#define __GFXMESSAGEUTILS_H__
|
||||
|
||||
#include "mozilla/webrender/webrender_ffi.h"
|
||||
#include "FilterSupport.h"
|
||||
#include "ImageTypes.h"
|
||||
#include "RegionBuilder.h"
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "mozilla/layers/CanvasRenderer.h"
|
||||
#include "mozilla/layers/LayerAttributes.h"
|
||||
#include "mozilla/layers/LayersTypes.h"
|
||||
#include "mozilla/webrender/WebRenderTypes.h"
|
||||
#include "mozilla/mozalloc.h" // for operator delete, etc
|
||||
#include "nsAutoPtr.h" // for nsAutoPtr, nsRefPtr, etc
|
||||
#include "nsCOMPtr.h" // for already_AddRefed
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "mozilla/TimeStamp.h" // for TimeStamp
|
||||
#include "mozilla/TypedEnumBits.h"
|
||||
#include "nsRegion.h"
|
||||
#include "nsStyleConsts.h"
|
||||
|
||||
#include <stdio.h> // FILE
|
||||
#include "mozilla/Logging.h" // for PR_LOG
|
||||
@ -43,6 +42,9 @@ struct ParamTraits;
|
||||
} // namespace IPC
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
enum class StyleBorderStyle : uint8_t;
|
||||
|
||||
namespace layers {
|
||||
|
||||
class TextureHost;
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "mozilla/HashFunctions.h" // for HashGeneric
|
||||
#include "mozilla/gfx/Logging.h" // for Log
|
||||
#include "mozilla/layers/LayersTypes.h" // for LayersId
|
||||
#include "nsHashKeys.h" // for nsPrintfCString
|
||||
#include "nsPrintfCString.h" // for nsPrintfCString
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -42,22 +42,6 @@ struct LangGroupFontPrefs {
|
||||
mLangGroup = nullptr;
|
||||
}
|
||||
|
||||
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const {
|
||||
size_t n = 0;
|
||||
LangGroupFontPrefs* curr = mNext.get();
|
||||
while (curr) {
|
||||
n += aMallocSizeOf(curr);
|
||||
|
||||
// Measurement of the following members may be added later if DMD finds
|
||||
// it is worthwhile:
|
||||
// - mLangGroup
|
||||
// - mDefault*Font
|
||||
|
||||
curr = curr->mNext.get();
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
// Initialize this with the data for a given language
|
||||
void Initialize(nsStaticAtom* aLangGroupAtom);
|
||||
|
||||
@ -103,7 +87,7 @@ struct LangGroupFontPrefs {
|
||||
nsFont mDefaultMonospaceFont;
|
||||
nsFont mDefaultCursiveFont;
|
||||
nsFont mDefaultFantasyFont;
|
||||
mozilla::UniquePtr<LangGroupFontPrefs> mNext;
|
||||
UniquePtr<LangGroupFontPrefs> mNext;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsRFPService.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
@ -18,12 +18,9 @@
|
||||
#include "nsITheme.h"
|
||||
#include "nsITimer.h"
|
||||
#include "nsRegionFwd.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/EventForwards.h"
|
||||
#include "mozilla/layers/APZTypes.h"
|
||||
#include "mozilla/layers/LayersTypes.h"
|
||||
#include "mozilla/layers/ScrollableLayerGuid.h"
|
||||
#include "mozilla/layers/ZoomConstraints.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
@ -47,6 +44,9 @@ class nsIRunnable;
|
||||
class nsIKeyEventInPluginCallback;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
enum class StyleWindowShadow : uint8_t;
|
||||
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
namespace ipc {
|
||||
class Shmem;
|
||||
@ -66,6 +66,7 @@ struct FrameMetrics;
|
||||
class LayerManager;
|
||||
class LayerManagerComposite;
|
||||
class PLayerTransactionChild;
|
||||
struct SLGuidAndRenderRoot;
|
||||
class WebRenderBridgeChild;
|
||||
} // namespace layers
|
||||
namespace gfx {
|
||||
|
Loading…
Reference in New Issue
Block a user