mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1180608 - Remove bogus assert, r=jandem. (b91acfeb8) - Bug 1159495 - Change Windows to Unix line endings in GMPUtils.cpp. r=whitespace (7d895d348) - Bug 1168053 - Unified build fix in dom/media/gmp. r=jwwang (dd78a0aa4) - Bug 470143 - Part 1/2 - Implement an IM IC for typeof nosuchvar. r=jandem (9e7678d6d) - Bug 1145442 - Add documentation for JIT strategies. r=shu (caacb732e) - Bug 1145442 - Update JIT Optimization docs patch. r=shu (6995cada4) - Bug 1145442 - More jit coach optimization outcome docs. r=shu (84deebdc0) - Bug 470143 - Part 2/2 - TrackedOptimization changes for TypeOfNoSuchVar. r=shu (fccfb49fa) - Bug 1178653 - Fix a few more tests for modified error messages. r=bustage in a CLOSED TREE (e14d56dc0) - Bug 77999 - Part 2: Add RuleProcessorCache. r=dbaron (f79158f64)
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
#include "mozilla/Likely.h"
|
||||
#include "mozilla/TypedEnumBits.h"
|
||||
#include "RuleProcessorCache.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
@@ -1005,7 +1006,8 @@ nsCSSRuleProcessor::nsCSSRuleProcessor(const sheet_array_type& aSheets,
|
||||
uint8_t aSheetType,
|
||||
Element* aScopeElement,
|
||||
nsCSSRuleProcessor*
|
||||
aPreviousCSSRuleProcessor)
|
||||
aPreviousCSSRuleProcessor,
|
||||
bool aIsShared)
|
||||
: mSheets(aSheets)
|
||||
, mRuleCascades(nullptr)
|
||||
, mPreviousCacheKey(aPreviousCSSRuleProcessor
|
||||
@@ -1014,6 +1016,8 @@ nsCSSRuleProcessor::nsCSSRuleProcessor(const sheet_array_type& aSheets,
|
||||
, mLastPresContext(nullptr)
|
||||
, mScopeElement(aScopeElement)
|
||||
, mSheetType(aSheetType)
|
||||
, mIsShared(aIsShared)
|
||||
, mInRuleProcessorCache(false)
|
||||
{
|
||||
NS_ASSERTION(!!mScopeElement == (aSheetType == nsStyleSet::eScopedDocSheet),
|
||||
"aScopeElement must be specified iff aSheetType is "
|
||||
@@ -1025,6 +1029,10 @@ nsCSSRuleProcessor::nsCSSRuleProcessor(const sheet_array_type& aSheets,
|
||||
|
||||
nsCSSRuleProcessor::~nsCSSRuleProcessor()
|
||||
{
|
||||
if (mInRuleProcessorCache) {
|
||||
RuleProcessorCache::RemoveRuleProcessor(this);
|
||||
}
|
||||
MOZ_ASSERT(!mExpirationState.IsTracked());
|
||||
ClearSheets();
|
||||
ClearRuleCascades();
|
||||
}
|
||||
@@ -2988,6 +2996,13 @@ nsCSSRuleProcessor::ClearRuleCascades()
|
||||
mPreviousCacheKey = CloneMQCacheKey();
|
||||
}
|
||||
|
||||
// No need to remove the rule processor from the RuleProcessorCache here,
|
||||
// since CSSStyleSheet::ClearRuleCascades will have called
|
||||
// RuleProcessorCache::RemoveSheet() passing itself, which will catch
|
||||
// this rule processor (and any others for different @-moz-document
|
||||
// cache key results).
|
||||
MOZ_ASSERT(!RuleProcessorCache::HasRuleProcessor(this));
|
||||
|
||||
// We rely on our caller (perhaps indirectly) to do something that
|
||||
// will rebuild style data and the user font set (either
|
||||
// nsIPresShell::ReconstructStyleData or
|
||||
|
||||
Reference in New Issue
Block a user