Bug 1379529 - drop AllowResolveStaleStyles flag. r=emilio

It's no longer used since bug 1357142.

MozReview-Commit-ID: LqNQTux2OZl

--HG--
extra : rebase_source : 6022601c76b5cec8cab2ac1039e489c624044329
This commit is contained in:
Hiroyuki Ikezoe 2017-07-11 07:51:34 +09:00
parent d30312d42f
commit ff401a20cf
3 changed files with 4 additions and 31 deletions

View File

@ -485,8 +485,7 @@ SERVO_BINDING_FUNC(Servo_NoteExplicitHints, void, RawGeckoElementBorrowed elemen
SERVO_BINDING_FUNC(Servo_TakeChangeHint, nsChangeHint, RawGeckoElementBorrowed element)
SERVO_BINDING_FUNC(Servo_ResolveStyle, ServoComputedValuesStrong,
RawGeckoElementBorrowed element,
RawServoStyleSetBorrowed set,
bool allow_stale)
RawServoStyleSetBorrowed set)
SERVO_BINDING_FUNC(Servo_ResolvePseudoStyle, ServoComputedValuesStrong,
RawGeckoElementBorrowed element,
mozilla::CSSPseudoElementType pseudo_type,

View File

@ -37,7 +37,6 @@ using namespace mozilla::dom;
ServoStyleSet::ServoStyleSet()
: mPresContext(nullptr)
, mAllowResolveStaleStyles(false)
, mAuthorStyleDisabled(false)
, mStylistState(StylistState::NotDirty)
, mUserFontSetUpdateGeneration(0)
@ -496,8 +495,8 @@ ServoStyleSet::ResolvePseudoElementStyle(Element* aOriginatingElement,
RefPtr<ServoComputedValues> computedValues;
if (aPseudoElement) {
MOZ_ASSERT(aType == aPseudoElement->GetPseudoElementType());
computedValues = Servo_ResolveStyle(aPseudoElement, mRawSet.get(),
mAllowResolveStaleStyles).Consume();
computedValues = Servo_ResolveStyle(aPseudoElement,
mRawSet.get()).Consume();
} else {
const ServoComputedValues* parentStyle =
aParentContext ? aParentContext->ComputedValues() : nullptr;
@ -1152,8 +1151,7 @@ already_AddRefed<ServoComputedValues>
ServoStyleSet::ResolveServoStyle(Element* aElement)
{
UpdateStylistIfNeeded();
return Servo_ResolveStyle(aElement, mRawSet.get(),
mAllowResolveStaleStyles).Consume();
return Servo_ResolveStyle(aElement, mRawSet.get()).Consume();
}
void

View File

@ -77,29 +77,6 @@ class ServoStyleSet
typedef ServoElementSnapshotTable SnapshotTable;
public:
class AutoAllowStaleStyles
{
public:
explicit AutoAllowStaleStyles(ServoStyleSet* aStyleSet)
: mStyleSet(aStyleSet)
{
if (mStyleSet) {
MOZ_ASSERT(!mStyleSet->mAllowResolveStaleStyles);
mStyleSet->mAllowResolveStaleStyles = true;
}
}
~AutoAllowStaleStyles()
{
if (mStyleSet) {
mStyleSet->mAllowResolveStaleStyles = false;
}
}
private:
ServoStyleSet* mStyleSet;
};
static bool IsInServoTraversal()
{
// The callers of this function are generally main-thread-only _except_
@ -603,7 +580,6 @@ private:
UniquePtr<RawServoStyleSet> mRawSet;
EnumeratedArray<SheetType, SheetType::Count,
nsTArray<RefPtr<ServoStyleSheet>>> mSheets;
bool mAllowResolveStaleStyles;
bool mAuthorStyleDisabled;
StylistState mStylistState;
uint64_t mUserFontSetUpdateGeneration;