decoupled style resolution api from frame system

This commit is contained in:
peterl%netscape.com 1998-11-03 20:16:23 +00:00
Родитель 44408018b3
Коммит 13bdbc9c30
7 изменённых файлов: 47 добавлений и 36 удалений

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

@ -26,7 +26,7 @@ class nsIStyleRule;
class nsISupportsArray;
class nsIPresContext;
class nsIContent;
class nsIFrame;
class nsIStyleContext;
// IID for the nsIStyleSheet interface {8c4a80a0-ad6a-11d1-8031-006008159b5a}
#define NS_ISTYLE_SHEET_IID \
@ -40,12 +40,13 @@ public:
// rules are ordered, those with higher precedence come last
virtual PRInt32 RulesMatching(nsIPresContext* aPresContext,
nsIContent* aContent,
nsIFrame* aParentFrame,
nsIStyleContext* aParentContext,
nsISupportsArray* aResults) = 0;
virtual PRInt32 RulesMatching(nsIPresContext* aPresContext,
nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
nsIStyleContext* aParentContext,
nsISupportsArray* aResults) = 0;
// XXX style rule enumerations

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

@ -88,29 +88,31 @@ public:
/**
* Resolve style for the given piece of content that will be a child
* of the aParentFrame frame. Don't use this for pseudo frames.
* of the aParentContext. Don't use this for pseudo frames.
*/
virtual nsIStyleContext* ResolveStyleContextFor(nsIContent* aContent,
nsIFrame* aParentFrame,
nsIStyleContext* aParentContext,
PRBool aForceUnique = PR_FALSE) = 0;
/**
* Resolve style for a pseudo frame within the given aParentFrame frame.
* Resolve style for a pseudo frame within the given aParentContent & aParentContext.
* The tag should be uppercase and inclue the colon.
* ie: NS_NewAtom(":FIRST-LINE");
*/
virtual nsIStyleContext* ResolvePseudoStyleContextFor(nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
virtual nsIStyleContext* ResolvePseudoStyleContextFor(nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIStyleContext* aParentContext,
PRBool aForceUnique = PR_FALSE) = 0;
/**
* Probe style for a pseudo frame within the given aParentFrame frame.
* Probe style for a pseudo frame within the given aParentContent & aParentContext.
* This will return nsnull id there are no explicit rules for the pseudo element.
* The tag should be uppercase and inclue the colon.
* ie: NS_NewAtom(":FIRST-LINE");
*/
virtual nsIStyleContext* ProbePseudoStyleContextFor(nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
virtual nsIStyleContext* ProbePseudoStyleContextFor(nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIStyleContext* aParentContext,
PRBool aForceUnique = PR_FALSE) = 0;
/**

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

@ -88,29 +88,31 @@ public:
/**
* Resolve style for the given piece of content that will be a child
* of the aParentFrame frame. Don't use this for pseudo frames.
* of the aParentContext. Don't use this for pseudo frames.
*/
virtual nsIStyleContext* ResolveStyleContextFor(nsIContent* aContent,
nsIFrame* aParentFrame,
nsIStyleContext* aParentContext,
PRBool aForceUnique = PR_FALSE) = 0;
/**
* Resolve style for a pseudo frame within the given aParentFrame frame.
* Resolve style for a pseudo frame within the given aParentContent & aParentContext.
* The tag should be uppercase and inclue the colon.
* ie: NS_NewAtom(":FIRST-LINE");
*/
virtual nsIStyleContext* ResolvePseudoStyleContextFor(nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
virtual nsIStyleContext* ResolvePseudoStyleContextFor(nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIStyleContext* aParentContext,
PRBool aForceUnique = PR_FALSE) = 0;
/**
* Probe style for a pseudo frame within the given aParentFrame frame.
* Probe style for a pseudo frame within the given aParentContent & aParentContext.
* This will return nsnull id there are no explicit rules for the pseudo element.
* The tag should be uppercase and inclue the colon.
* ie: NS_NewAtom(":FIRST-LINE");
*/
virtual nsIStyleContext* ProbePseudoStyleContextFor(nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
virtual nsIStyleContext* ProbePseudoStyleContextFor(nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIStyleContext* aParentContext,
PRBool aForceUnique = PR_FALSE) = 0;
/**

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

@ -71,21 +71,23 @@ public:
// get a style context for a non-pseudo frame
virtual nsIStyleContext* ResolveStyleFor(nsIPresContext* aPresContext,
nsIContent* aContent,
nsIFrame* aParentFrame,
nsIStyleContext* aParentContext,
PRBool aForceUnique = PR_FALSE) = 0;
// get a style context for a pseudo-frame (ie: tag = NS_NewAtom(":FIRST-LINE");
virtual nsIStyleContext* ResolvePseudoStyleFor(nsIPresContext* aPresContext,
nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
nsIStyleContext* aParentContext,
PRBool aForceUnique = PR_FALSE) = 0;
// This funtions just like ResolvePseudoStyleFor except that it will
// return nsnull if there are no explicit style rules for that
// pseudo element
virtual nsIStyleContext* ProbePseudoStyleFor(nsIPresContext* aPresContext,
nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
nsIStyleContext* aParentContext,
PRBool aForceUnique = PR_FALSE) = 0;
// Handles association of elements in the content model to frames. Finds the

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

@ -26,7 +26,7 @@ class nsIStyleRule;
class nsISupportsArray;
class nsIPresContext;
class nsIContent;
class nsIFrame;
class nsIStyleContext;
// IID for the nsIStyleSheet interface {8c4a80a0-ad6a-11d1-8031-006008159b5a}
#define NS_ISTYLE_SHEET_IID \
@ -40,12 +40,13 @@ public:
// rules are ordered, those with higher precedence come last
virtual PRInt32 RulesMatching(nsIPresContext* aPresContext,
nsIContent* aContent,
nsIFrame* aParentFrame,
nsIStyleContext* aParentContext,
nsISupportsArray* aResults) = 0;
virtual PRInt32 RulesMatching(nsIPresContext* aPresContext,
nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
nsIStyleContext* aParentContext,
nsISupportsArray* aResults) = 0;
// XXX style rule enumerations

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

@ -88,29 +88,31 @@ public:
/**
* Resolve style for the given piece of content that will be a child
* of the aParentFrame frame. Don't use this for pseudo frames.
* of the aParentContext. Don't use this for pseudo frames.
*/
virtual nsIStyleContext* ResolveStyleContextFor(nsIContent* aContent,
nsIFrame* aParentFrame,
nsIStyleContext* aParentContext,
PRBool aForceUnique = PR_FALSE) = 0;
/**
* Resolve style for a pseudo frame within the given aParentFrame frame.
* Resolve style for a pseudo frame within the given aParentContent & aParentContext.
* The tag should be uppercase and inclue the colon.
* ie: NS_NewAtom(":FIRST-LINE");
*/
virtual nsIStyleContext* ResolvePseudoStyleContextFor(nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
virtual nsIStyleContext* ResolvePseudoStyleContextFor(nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIStyleContext* aParentContext,
PRBool aForceUnique = PR_FALSE) = 0;
/**
* Probe style for a pseudo frame within the given aParentFrame frame.
* Probe style for a pseudo frame within the given aParentContent & aParentContext.
* This will return nsnull id there are no explicit rules for the pseudo element.
* The tag should be uppercase and inclue the colon.
* ie: NS_NewAtom(":FIRST-LINE");
*/
virtual nsIStyleContext* ProbePseudoStyleContextFor(nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
virtual nsIStyleContext* ProbePseudoStyleContextFor(nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIStyleContext* aParentContext,
PRBool aForceUnique = PR_FALSE) = 0;
/**

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

@ -26,7 +26,7 @@ class nsIStyleRule;
class nsISupportsArray;
class nsIPresContext;
class nsIContent;
class nsIFrame;
class nsIStyleContext;
// IID for the nsIStyleSheet interface {8c4a80a0-ad6a-11d1-8031-006008159b5a}
#define NS_ISTYLE_SHEET_IID \
@ -40,12 +40,13 @@ public:
// rules are ordered, those with higher precedence come last
virtual PRInt32 RulesMatching(nsIPresContext* aPresContext,
nsIContent* aContent,
nsIFrame* aParentFrame,
nsIStyleContext* aParentContext,
nsISupportsArray* aResults) = 0;
virtual PRInt32 RulesMatching(nsIPresContext* aPresContext,
nsIContent* aParentContent,
nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
nsIStyleContext* aParentContext,
nsISupportsArray* aResults) = 0;
// XXX style rule enumerations