fixup!
Bug 1373018 - Part 7: stylo: Move nsStyleContext::mSource into subclasses; r?bholley
--- a/layout/style/GeckoStyleContext.cpp
+++ b/layout/style/GeckoStyleContext.cpp
@@ -201,27 +201,28 @@ GeckoStyleContext::FindChildWithRules(co
nsRuleNode* aSource,
nsRuleNode* aSourceIfVisited,
bool aRelevantLinkVisited)
{
uint32_t threshold = 10; // The # of siblings we're willing to examine
// before just giving this whole thing up.
RefPtr<GeckoStyleContext> result;
- GeckoStyleContext *list = aSource.MatchesNoRules() ? mEmptyChild : mChild;
+ MOZ_ASSERT(aSource);
+ GeckoStyleContext *list = aSource->IsRoot() ? mEmptyChild : mChild;
if (list) {
GeckoStyleContext *child = list;
do {
if (child->StyleSource() == aSource &&
child->mPseudoTag == aPseudoTag &&
!child->IsStyleIfVisited() &&
child->RelevantLinkVisited() == aRelevantLinkVisited) {
bool match = false;
- if (!aSourceIfVisited.IsNull()) {
+ if (!aSourceIfVisited) {
match = child->GetStyleIfVisited() &&
child->GetStyleIfVisited()->RuleNode() == aSourceIfVisited;
} else {
match = !child->GetStyleIfVisited();
}
if (match && !(child->mBits & NS_STYLE_INELIGIBLE_FOR_SHARING)) {
result = child;
break;