Bug 598832 part 2. Move tracking of the scope root to the TreeMatchContext. r=dbaron

This commit is contained in:
Boris Zbarsky 2011-03-29 13:29:20 -04:00
Родитель 4e6bf4af7c
Коммит a691fa82b9
2 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -1119,7 +1119,6 @@ RuleProcessorData::RuleProcessorData(nsPresContext* aPresContext,
mPresContext(aPresContext),
mElement(aElement),
mRuleWalker(aRuleWalker),
mScopedRoot(nsnull),
mPreviousSiblingData(nsnull),
mParentData(nsnull),
mLanguage(nsnull),

Просмотреть файл

@ -81,11 +81,16 @@ struct TreeMatchContext {
// nsRuleWalker::VisitedHandlingType.
nsRuleWalker::VisitedHandlingType mVisitedHandling;
// Root of scoped stylesheet (set and unset by the supplier of the
// scoped stylesheet).
nsIContent* mScopedRoot;
TreeMatchContext(PRBool aForStyling,
nsRuleWalker::VisitedHandlingType aVisitedHandling)
: mForStyling(aForStyling)
, mHaveRelevantLink(PR_FALSE)
, mVisitedHandling(aVisitedHandling)
, mScopedRoot(nsnull)
{
}
};
@ -174,7 +179,6 @@ public:
mozilla::dom::Element* mElement; // weak ref, must not be null
nsIContent* mParentContent; // mElement->GetParent(); weak ref
nsRuleWalker* mRuleWalker; // Used to add rules to our results.
nsIContent* mScopedRoot; // Root of scoped stylesheet (set and unset by the supplier of the scoped stylesheet
nsIAtom* mContentTag; // mElement->GetTag()
nsIAtom* mContentID; // mElement->GetID()