mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
Bug 1289622 - Delegate CalcStyleDifference to a templated helper. r=heycam
This commit is contained in:
parent
55b3f93f9f
commit
9f75d89883
@ -891,11 +891,12 @@ nsStyleContext::ApplyStyleFixups(bool aSkipParentDisplayBasedStyleFixup)
|
|||||||
#undef GET_UNIQUE_STYLE_DATA
|
#undef GET_UNIQUE_STYLE_DATA
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class StyleContextLike>
|
||||||
nsChangeHint
|
nsChangeHint
|
||||||
nsStyleContext::CalcStyleDifference(nsStyleContext* aNewContext,
|
nsStyleContext::CalcStyleDifferenceInternal(StyleContextLike* aNewContext,
|
||||||
nsChangeHint aParentHintsNotHandledForDescendants,
|
nsChangeHint aParentHintsNotHandledForDescendants,
|
||||||
uint32_t* aEqualStructs,
|
uint32_t* aEqualStructs,
|
||||||
uint32_t* aSamePointerStructs)
|
uint32_t* aSamePointerStructs)
|
||||||
{
|
{
|
||||||
PROFILER_LABEL("nsStyleContext", "CalcStyleDifference",
|
PROFILER_LABEL("nsStyleContext", "CalcStyleDifference",
|
||||||
js::ProfileEntry::Category::CSS);
|
js::ProfileEntry::Category::CSS);
|
||||||
@ -1213,6 +1214,16 @@ nsStyleContext::CalcStyleDifference(nsStyleContext* aNewContext,
|
|||||||
return hint & ~nsChangeHint_NeutralChange;
|
return hint & ~nsChangeHint_NeutralChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nsChangeHint
|
||||||
|
nsStyleContext::CalcStyleDifference(nsStyleContext* aNewContext,
|
||||||
|
nsChangeHint aParentHintsNotHandledForDescendants,
|
||||||
|
uint32_t* aEqualStructs,
|
||||||
|
uint32_t* aSamePointerStructs)
|
||||||
|
{
|
||||||
|
return CalcStyleDifferenceInternal(aNewContext, aParentHintsNotHandledForDescendants,
|
||||||
|
aEqualStructs, aSamePointerStructs);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
void nsStyleContext::List(FILE* out, int32_t aIndent, bool aListDescendants)
|
void nsStyleContext::List(FILE* out, int32_t aIndent, bool aListDescendants)
|
||||||
{
|
{
|
||||||
|
@ -398,6 +398,14 @@ public:
|
|||||||
uint32_t* aEqualStructs,
|
uint32_t* aEqualStructs,
|
||||||
uint32_t* aSamePointerStructs);
|
uint32_t* aSamePointerStructs);
|
||||||
|
|
||||||
|
private:
|
||||||
|
template<class StyleContextLike>
|
||||||
|
nsChangeHint CalcStyleDifferenceInternal(StyleContextLike* aNewContext,
|
||||||
|
nsChangeHint aParentHintsNotHandledForDescendants,
|
||||||
|
uint32_t* aEqualStructs,
|
||||||
|
uint32_t* aSamePointerStructs);
|
||||||
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a color that depends on link-visitedness using this and
|
* Get a color that depends on link-visitedness using this and
|
||||||
* this->GetStyleIfVisited().
|
* this->GetStyleIfVisited().
|
||||||
|
Loading…
Reference in New Issue
Block a user