mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Issue #2828 - Part 13: Exclude strong layers-related code from release builds
I'll be leaving this in here for future use. CSSWG hasn't defined how this will be exposed to CSSOM yet. The parser bits are also not yet implemented.
This commit is contained in:
parent
e3476d33ed
commit
318031c74b
2 changed files with 10 additions and 0 deletions
|
|
@ -1622,7 +1622,9 @@ CascadeLayer::CascadeLayer(nsPresContext* aPresContext,
|
|||
nsMediaQueryResultCacheKey& aCacheKey)
|
||||
: mPresContext(aPresContext)
|
||||
, mIsAnonymous(true)
|
||||
#ifdef DEBUG
|
||||
, mIsStrong(false)
|
||||
#endif
|
||||
, mRulesAdded(false)
|
||||
#ifdef DEBUG
|
||||
, mParent(aParent)
|
||||
|
|
@ -1655,7 +1657,9 @@ CascadeLayer::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
|
|||
// don't count them. Their ownership is managed by the rule processor
|
||||
// to which they are eventually attached (see nsCSSRuleProcessor).
|
||||
n += mPreLayers.ShallowSizeOfExcludingThis(aMallocSizeOf);
|
||||
#ifdef DEBUG
|
||||
n += mPostLayers.ShallowSizeOfExcludingThis(aMallocSizeOf);
|
||||
#endif
|
||||
n += mLayers.ShallowSizeOfExcludingThis(aMallocSizeOf);
|
||||
for (auto iter = mLayers.ConstIter(); !iter.Done(); iter.Next()) {
|
||||
// We don't own the CascadeLayer objects so we don't count them. We
|
||||
|
|
@ -1779,9 +1783,11 @@ CascadeLayer::EnumerateAllLayers(nsLayerEnumFunc aFunc, void* aData)
|
|||
|
||||
(*aFunc)(this, aData);
|
||||
|
||||
#ifdef DEBUG
|
||||
if (mPostLayers.Length() > 0) {
|
||||
for (CascadeLayer* post : mPostLayers) {
|
||||
post->EnumerateAllLayers(aFunc, aData);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -341,7 +341,9 @@ struct CascadeLayer
|
|||
nsPresContext* mPresContext;
|
||||
nsString mName;
|
||||
bool mIsAnonymous;
|
||||
#ifdef DEBUG
|
||||
bool mIsStrong;
|
||||
#endif
|
||||
bool mRulesAdded;
|
||||
|
||||
RuleCascadeData* mData;
|
||||
|
|
@ -357,7 +359,9 @@ struct CascadeLayer
|
|||
CascadeLayer* mParent;
|
||||
#endif
|
||||
nsTArray<CascadeLayer*> mPreLayers;
|
||||
#ifdef DEBUG
|
||||
nsTArray<CascadeLayer*> mPostLayers;
|
||||
#endif
|
||||
nsDataHashtable<nsStringHashKey, CascadeLayer*> mLayers;
|
||||
|
||||
CascadeLayer* CreateNamedChildLayer(const nsTArray<nsString>& aPath);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue