зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1448728 part 1 - Make popular headers not include nsWindowSizes.h. r=njn
MozReview-Commit-ID: EC5J9Im3gfu --HG-- extra : source : 9fa9209aeeb00009143c5c21f21210c93184e61f
This commit is contained in:
Родитель
cae93b8fe4
Коммит
1962625a79
|
@ -37,6 +37,7 @@
|
|||
#include "nsBidiUtils.h"
|
||||
#include "PLDHashTable.h"
|
||||
#include "mozilla/Sprintf.h"
|
||||
#include "nsWindowSizes.h"
|
||||
#include "nsWrapperCacheInlines.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
#include "nsAttrValueOrString.h"
|
||||
#include "nsAttrValueInlines.h"
|
||||
#include "nsCSSPseudoElements.h"
|
||||
#include "nsWindowSizes.h"
|
||||
#ifdef MOZ_XUL
|
||||
#include "nsXULElement.h"
|
||||
#endif /* MOZ_XUL */
|
||||
|
|
|
@ -84,6 +84,7 @@
|
|||
#include "nsContentUtils.h"
|
||||
#include "nsTextFragment.h"
|
||||
#include "nsContentCID.h"
|
||||
#include "nsWindowSizes.h"
|
||||
|
||||
#include "nsIDOMEventListener.h"
|
||||
#include "nsIWebNavigation.h"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
namespace mozilla {
|
||||
|
||||
class EventStates;
|
||||
class SizeOfState;
|
||||
|
||||
namespace dom {
|
||||
|
||||
|
|
|
@ -2405,6 +2405,13 @@ nsINode::AddSizeOfExcludingThis(nsWindowSizes& aSizes, size_t* aNodeSize) const
|
|||
// non-owning
|
||||
}
|
||||
|
||||
void
|
||||
nsINode::AddSizeOfIncludingThis(nsWindowSizes& aSizes, size_t* aNodeSize) const
|
||||
{
|
||||
*aNodeSize += aSizes.mState.mMallocSizeOf(this);
|
||||
AddSizeOfExcludingThis(aSizes, aNodeSize);
|
||||
}
|
||||
|
||||
#define EVENT(name_, id_, type_, struct_) \
|
||||
EventHandlerNonNull* nsINode::GetOn##name_() { \
|
||||
EventListenerManager *elm = GetExistingListenerManager(); \
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "nsNodeInfoManager.h" // for use in NodePrincipal()
|
||||
#include "nsPropertyTable.h" // for typedefs
|
||||
#include "nsTObserverArray.h" // for member
|
||||
#include "nsWindowSizes.h" // for nsStyleSizes
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/LinkedList.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
|
@ -56,6 +55,7 @@ class nsNodeSupportsWeakRefTearoff;
|
|||
class nsNodeWeakReference;
|
||||
class nsDOMMutationObserver;
|
||||
class nsRange;
|
||||
class nsWindowSizes;
|
||||
struct RawServoSelectorList;
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -359,11 +359,7 @@ public:
|
|||
// way that |this| points to the start of the allocated object, even in
|
||||
// methods of nsINode's sub-classes, so aSizes.mState.mMallocSizeOf(this) is
|
||||
// always safe to call no matter which object it was invoked on.
|
||||
virtual void AddSizeOfIncludingThis(nsWindowSizes& aSizes,
|
||||
size_t* aNodeSize) const {
|
||||
*aNodeSize += aSizes.mState.mMallocSizeOf(this);
|
||||
AddSizeOfExcludingThis(aSizes, aNodeSize);
|
||||
}
|
||||
void AddSizeOfIncludingThis(nsWindowSizes& aSizes, size_t* aNodeSize) const;
|
||||
|
||||
friend class nsNodeUtils;
|
||||
friend class nsNodeWeakReference;
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "nsIPresShell.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsWindowSizes.h"
|
||||
|
||||
NS_IMPL_NS_NEW_HTML_ELEMENT(Anchor)
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "mozilla/EventDispatcher.h"
|
||||
#include "mozilla/EventStates.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "nsWindowSizes.h"
|
||||
|
||||
NS_IMPL_NS_NEW_HTML_ELEMENT(Area)
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "nsStyleConsts.h"
|
||||
#include "nsStyleLinkElement.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsWindowSizes.h"
|
||||
|
||||
#define LINK_ELEMENT_FLAG_BIT(n_) \
|
||||
NODE_FLAG_BIT(ELEMENT_TYPE_SPECIFIC_BITS_OFFSET + (n_))
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "nsGkAtoms.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsStyleStruct.h"
|
||||
#include "nsWindowSizes.h"
|
||||
#include "SVGContentUtils.h"
|
||||
|
||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Path)
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsDOMJSUtils.h"
|
||||
#include "nsWindowSizes.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "xpcpublic.h"
|
||||
#include "mozilla/scache/StartupCache.h"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "Image.h"
|
||||
#include "Layers.h" // for LayerManager
|
||||
#include "nsRefreshDriver.h"
|
||||
#include "mozilla/SizeOfState.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "mozilla/Tuple.h" // for Tie
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "mozilla/Move.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/SizeOfState.h"
|
||||
#include <stdint.h>
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "nsIRunnable.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "nsWindowSizes.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/Services.h"
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "GeckoProfiler.h"
|
||||
#include "nsIStatefulFrame.h"
|
||||
#include "nsContainerFrame.h"
|
||||
#include "nsWindowSizes.h"
|
||||
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
|
||||
|
|
|
@ -94,6 +94,7 @@
|
|||
#include "nsRegion.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
#include "nsStyleChangeList.h"
|
||||
#include "nsWindowSizes.h"
|
||||
|
||||
#include "mozilla/AsyncEventDispatcher.h"
|
||||
#include "mozilla/EffectCompositor.h"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "mozilla/ComputedStyle.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIMemoryReporter.h"
|
||||
#include "nsWindowSizes.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "nsStyleStructInlines.h"
|
||||
#include "nsString.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsWindowSizes.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIPresShell.h"
|
||||
|
@ -447,4 +448,17 @@ ComputedStyle::GetCachedLazyPseudoStyle(CSSPseudoElementType aPseudo) const
|
|||
return mCachedInheritingStyles.Lookup(nsCSSPseudoElements::GetPseudoAtom(aPseudo));
|
||||
}
|
||||
|
||||
void
|
||||
ComputedStyle::AddSizeOfIncludingThis(nsWindowSizes& aSizes,
|
||||
size_t* aCVsSize) const
|
||||
{
|
||||
// Note: |this| sits within a servo_arc::Arc, i.e. it is preceded by a
|
||||
// refcount. So we need to measure it with a function that can handle an
|
||||
// interior pointer. We use ServoComputedValuesMallocEnclosingSizeOf to
|
||||
// clearly identify in DMD's output the memory measured here.
|
||||
*aCVsSize += ServoComputedValuesMallocEnclosingSizeOf(this);
|
||||
mSource.AddSizeOfExcludingThis(aSizes);
|
||||
mCachedInheritingStyles.AddSizeOfIncludingThis(aSizes, aCVsSize);
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#define _ComputedStyle_h_
|
||||
|
||||
#include "nsIMemoryReporter.h"
|
||||
#include "nsWindowSizes.h"
|
||||
#include <algorithm>
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/RestyleLogging.h"
|
||||
|
@ -22,6 +21,7 @@
|
|||
|
||||
class nsAtom;
|
||||
class nsPresContext;
|
||||
class nsWindowSizes;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -354,16 +354,7 @@ public:
|
|||
// The |aCVsSize| outparam on this function is where the actual CVs size
|
||||
// value is added. It's done that way because the callers know which value
|
||||
// the size should be added to.
|
||||
void AddSizeOfIncludingThis(nsWindowSizes& aSizes, size_t* aCVsSize) const
|
||||
{
|
||||
// Note: |this| sits within a servo_arc::Arc, i.e. it is preceded by a
|
||||
// refcount. So we need to measure it with a function that can handle an
|
||||
// interior pointer. We use ServoComputedValuesMallocEnclosingSizeOf to
|
||||
// clearly identify in DMD's output the memory measured here.
|
||||
*aCVsSize += ServoComputedValuesMallocEnclosingSizeOf(this);
|
||||
mSource.AddSizeOfExcludingThis(aSizes);
|
||||
mCachedInheritingStyles.AddSizeOfIncludingThis(aSizes, aCVsSize);
|
||||
}
|
||||
void AddSizeOfIncludingThis(nsWindowSizes& aSizes, size_t* aCVsSize) const;
|
||||
|
||||
protected:
|
||||
// Needs to be friend so that it can call the destructor without making it
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "nsSVGElement.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsTransitionManager.h"
|
||||
#include "nsWindowSizes.h"
|
||||
|
||||
#include "mozilla/CORSMode.h"
|
||||
#include "mozilla/DeclarationBlockInlines.h"
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "nsXBLPrototypeBinding.h"
|
||||
#include "gfxUserFontSet.h"
|
||||
#include "nsBindingManager.h"
|
||||
#include "nsWindowSizes.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
|
Загрузка…
Ссылка в новой задаче