mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Use nsStyleStruct MaxDifference methods instead of maxHint for hint handling in nsStyleContext::CalcStyleDifference. (Bug 779968, patch 2) r=bzbarsky
This commit is contained in:
parent
c0a7826aa0
commit
f4c3dff3e0
@ -378,11 +378,12 @@ nsStyleContext::CalcStyleDifference(nsStyleContext* aOther)
|
|||||||
// we could later get a small change in one of those structs that we
|
// we could later get a small change in one of those structs that we
|
||||||
// don't want to miss.
|
// don't want to miss.
|
||||||
|
|
||||||
// If our rule nodes are the same, then we are looking at the same
|
// If our rule nodes are the same, then any differences in style data
|
||||||
// style data. We know this because CalcStyleDifference is always
|
// are already accounted for by differences on ancestors. We know
|
||||||
// called on two style contexts that point to the same element, so we
|
// this because CalcStyleDifference is always called on two style
|
||||||
// know that our position in the style context tree is the same and
|
// contexts that point to the same element, so we know that our
|
||||||
// our position in the rule node tree is also the same.
|
// position in the style context tree is the same and our position in
|
||||||
|
// the rule node tree is also the same.
|
||||||
bool compare = mRuleNode != aOther->mRuleNode;
|
bool compare = mRuleNode != aOther->mRuleNode;
|
||||||
|
|
||||||
#define DO_STRUCT_DIFFERENCE(struct_) \
|
#define DO_STRUCT_DIFFERENCE(struct_) \
|
||||||
@ -393,7 +394,7 @@ nsStyleContext::CalcStyleDifference(nsStyleContext* aOther)
|
|||||||
if (this##struct_) { \
|
if (this##struct_) { \
|
||||||
const nsStyle##struct_* other##struct_ = aOther->GetStyle##struct_(); \
|
const nsStyle##struct_* other##struct_ = aOther->GetStyle##struct_(); \
|
||||||
if ((compare || nsStyle##struct_::ForceCompare()) && \
|
if ((compare || nsStyle##struct_::ForceCompare()) && \
|
||||||
!NS_IsHintSubset(maxHint, hint) && \
|
!NS_IsHintSubset(nsStyle##struct_::MaxDifference(), hint) && \
|
||||||
this##struct_ != other##struct_) { \
|
this##struct_ != other##struct_) { \
|
||||||
NS_ASSERTION(NS_IsHintSubset( \
|
NS_ASSERTION(NS_IsHintSubset( \
|
||||||
this##struct_->CalcDifference(*other##struct_), \
|
this##struct_->CalcDifference(*other##struct_), \
|
||||||
|
Loading…
Reference in New Issue
Block a user