decoupled style context resolution from frames

This commit is contained in:
peterl%netscape.com 1998-11-03 20:20:07 +00:00
Родитель a539d1f903
Коммит 9a58917a1a
3 изменённых файлов: 27 добавлений и 21 удалений

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

@ -219,14 +219,14 @@ nsPresContext::GetBaseURL(nsIURL*& aURL)
nsIStyleContext*
nsPresContext::ResolveStyleContextFor(nsIContent* aContent,
nsIFrame* aParentFrame,
nsIStyleContext* aParentContext,
PRBool aForceUnique)
{
nsIStyleContext* result = nsnull;
nsIStyleSet* set = mShell->GetStyleSet();
if (nsnull != set) {
result = set->ResolveStyleFor(this, aContent, aParentFrame, aForceUnique);
result = set->ResolveStyleFor(this, aContent, aParentContext, aForceUnique);
NS_RELEASE(set);
}
@ -234,15 +234,16 @@ nsPresContext::ResolveStyleContextFor(nsIContent* aContent,
}
nsIStyleContext*
nsPresContext::ResolvePseudoStyleContextFor(nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
nsPresContext::ResolvePseudoStyleContextFor(nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIStyleContext* aParentContext,
PRBool aForceUnique)
{
nsIStyleContext* result = nsnull;
nsIStyleSet* set = mShell->GetStyleSet();
if (nsnull != set) {
result = set->ResolvePseudoStyleFor(this, aPseudoTag, aParentFrame, aForceUnique);
result = set->ResolvePseudoStyleFor(this, aParentContent, aPseudoTag, aParentContext, aForceUnique);
NS_RELEASE(set);
}
@ -250,15 +251,16 @@ nsPresContext::ResolvePseudoStyleContextFor(nsIAtom* aPseudoTag,
}
nsIStyleContext*
nsPresContext::ProbePseudoStyleContextFor(nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
nsPresContext::ProbePseudoStyleContextFor(nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIStyleContext* aParentContext,
PRBool aForceUnique)
{
nsIStyleContext* result = nsnull;
nsIStyleSet* set = mShell->GetStyleSet();
if (nsnull != set) {
result = set->ProbePseudoStyleFor(this, aPseudoTag, aParentFrame, aForceUnique);
result = set->ProbePseudoStyleFor(this, aParentContent, aPseudoTag, aParentContext, aForceUnique);
NS_RELEASE(set);
}

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

@ -219,14 +219,14 @@ nsPresContext::GetBaseURL(nsIURL*& aURL)
nsIStyleContext*
nsPresContext::ResolveStyleContextFor(nsIContent* aContent,
nsIFrame* aParentFrame,
nsIStyleContext* aParentContext,
PRBool aForceUnique)
{
nsIStyleContext* result = nsnull;
nsIStyleSet* set = mShell->GetStyleSet();
if (nsnull != set) {
result = set->ResolveStyleFor(this, aContent, aParentFrame, aForceUnique);
result = set->ResolveStyleFor(this, aContent, aParentContext, aForceUnique);
NS_RELEASE(set);
}
@ -234,15 +234,16 @@ nsPresContext::ResolveStyleContextFor(nsIContent* aContent,
}
nsIStyleContext*
nsPresContext::ResolvePseudoStyleContextFor(nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
nsPresContext::ResolvePseudoStyleContextFor(nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIStyleContext* aParentContext,
PRBool aForceUnique)
{
nsIStyleContext* result = nsnull;
nsIStyleSet* set = mShell->GetStyleSet();
if (nsnull != set) {
result = set->ResolvePseudoStyleFor(this, aPseudoTag, aParentFrame, aForceUnique);
result = set->ResolvePseudoStyleFor(this, aParentContent, aPseudoTag, aParentContext, aForceUnique);
NS_RELEASE(set);
}
@ -250,15 +251,16 @@ nsPresContext::ResolvePseudoStyleContextFor(nsIAtom* aPseudoTag,
}
nsIStyleContext*
nsPresContext::ProbePseudoStyleContextFor(nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
nsPresContext::ProbePseudoStyleContextFor(nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIStyleContext* aParentContext,
PRBool aForceUnique)
{
nsIStyleContext* result = nsnull;
nsIStyleSet* set = mShell->GetStyleSet();
if (nsnull != set) {
result = set->ProbePseudoStyleFor(this, aPseudoTag, aParentFrame, aForceUnique);
result = set->ProbePseudoStyleFor(this, aParentContent, aPseudoTag, aParentContext, aForceUnique);
NS_RELEASE(set);
}

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

@ -39,13 +39,15 @@ public:
NS_IMETHOD SetCompatibilityMode(nsCompatibility aMode);
NS_IMETHOD GetBaseURL(nsIURL*& aURL);
virtual nsIStyleContext* ResolveStyleContextFor(nsIContent* aContent,
nsIFrame* aParentFrame,
nsIStyleContext* aParentContext,
PRBool aForceUnique = PR_FALSE);
virtual nsIStyleContext* ResolvePseudoStyleContextFor(nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
virtual nsIStyleContext* ResolvePseudoStyleContextFor(nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIStyleContext* aParentContext,
PRBool aForceUnique = PR_FALSE);
virtual nsIStyleContext* ProbePseudoStyleContextFor(nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
virtual nsIStyleContext* ProbePseudoStyleContextFor(nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIStyleContext* aParentContext,
PRBool aForceUnique = PR_FALSE);
virtual nsIFontMetrics* GetMetricsFor(const nsFont& aFont);
virtual const nsFont& GetDefaultFont(void);