added pseudo frame style support

git-svn-id: svn://10.0.0.236/trunk@1839 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterl
1998-05-18 21:03:10 +00:00
parent 80dd125ad5
commit 796739f0d7
7 changed files with 83 additions and 4 deletions

View File

@@ -42,6 +42,11 @@ public:
nsIFrame* aParentFrame,
nsISupportsArray* aResults) = 0;
virtual PRInt32 RulesMatching(nsIPresContext* aPresContext,
nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
nsISupportsArray* aResults) = 0;
// XXX style rule enumerations
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const = 0;

View File

@@ -33,6 +33,7 @@ class nsIImageGroup;
class nsILinkHandler;
class nsIPresShell;
class nsIStyleContext;
class nsIAtom;
class nsString;
#define NS_IPRESCONTEXT_IID \
@@ -57,11 +58,27 @@ public:
/**
* Resolve style for the given piece of content that will be a child
* of the aParentFrame frame.
* of the aParentFrame frame. Don't use this for pseudo frames.
*/
virtual nsIStyleContext* ResolveStyleContextFor(nsIContent* aContent,
nsIFrame* aParentFrame) = 0;
/**
* Resolve style for a pseudo frame within the given aParentFrame frame.
* The tag should be uppercase and inclue the colon.
* ie: NS_NewAtom(":FIRST-LINE");
*/
virtual nsIStyleContext* ResolvePseudoStyleContextFor(nsIAtom* aPseudoTag,
nsIFrame* aParentFrame) = 0;
/**
* Probe style for a pseudo frame within the given aParentFrame frame.
* 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) = 0;
/**
* Get the font metrics for a given font.
*/

View File

@@ -33,6 +33,7 @@ class nsIImageGroup;
class nsILinkHandler;
class nsIPresShell;
class nsIStyleContext;
class nsIAtom;
class nsString;
#define NS_IPRESCONTEXT_IID \
@@ -57,11 +58,27 @@ public:
/**
* Resolve style for the given piece of content that will be a child
* of the aParentFrame frame.
* of the aParentFrame frame. Don't use this for pseudo frames.
*/
virtual nsIStyleContext* ResolveStyleContextFor(nsIContent* aContent,
nsIFrame* aParentFrame) = 0;
/**
* Resolve style for a pseudo frame within the given aParentFrame frame.
* The tag should be uppercase and inclue the colon.
* ie: NS_NewAtom(":FIRST-LINE");
*/
virtual nsIStyleContext* ResolvePseudoStyleContextFor(nsIAtom* aPseudoTag,
nsIFrame* aParentFrame) = 0;
/**
* Probe style for a pseudo frame within the given aParentFrame frame.
* 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) = 0;
/**
* Get the font metrics for a given font.
*/

View File

@@ -65,14 +65,27 @@ public:
virtual PRInt32 GetNumberOfBackstopStyleSheets() = 0;
virtual nsIStyleSheet* GetBackstopStyleSheetAt(PRInt32 aIndex) = 0;
// get a style context for a non-pseudo frame
virtual nsIStyleContext* ResolveStyleFor(nsIPresContext* aPresContext,
nsIContent* aContent,
nsIFrame* aParentFrame) = 0;
// get a style context for a pseudo-frame (ie: tag = NS_NewAtom(":FIRST-LINE");
virtual nsIStyleContext* ResolvePseudoStyleFor(nsIPresContext* aPresContext,
nsIAtom* aPseudoTag,
nsIFrame* aParentFrame) = 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,
nsIAtom* aPseudoTag,
nsIFrame* aParentFrame) = 0;
// xxx style rules enumeration
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) = 0;
virtual void ListContexts(FILE* out = stdout, PRInt32 aIndent = 0) = 0;
};
extern NS_LAYOUT nsresult

View File

@@ -42,6 +42,11 @@ public:
nsIFrame* aParentFrame,
nsISupportsArray* aResults) = 0;
virtual PRInt32 RulesMatching(nsIPresContext* aPresContext,
nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
nsISupportsArray* aResults) = 0;
// XXX style rule enumerations
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const = 0;

View File

@@ -33,6 +33,7 @@ class nsIImageGroup;
class nsILinkHandler;
class nsIPresShell;
class nsIStyleContext;
class nsIAtom;
class nsString;
#define NS_IPRESCONTEXT_IID \
@@ -57,11 +58,27 @@ public:
/**
* Resolve style for the given piece of content that will be a child
* of the aParentFrame frame.
* of the aParentFrame frame. Don't use this for pseudo frames.
*/
virtual nsIStyleContext* ResolveStyleContextFor(nsIContent* aContent,
nsIFrame* aParentFrame) = 0;
/**
* Resolve style for a pseudo frame within the given aParentFrame frame.
* The tag should be uppercase and inclue the colon.
* ie: NS_NewAtom(":FIRST-LINE");
*/
virtual nsIStyleContext* ResolvePseudoStyleContextFor(nsIAtom* aPseudoTag,
nsIFrame* aParentFrame) = 0;
/**
* Probe style for a pseudo frame within the given aParentFrame frame.
* 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) = 0;
/**
* Get the font metrics for a given font.
*/

View File

@@ -42,6 +42,11 @@ public:
nsIFrame* aParentFrame,
nsISupportsArray* aResults) = 0;
virtual PRInt32 RulesMatching(nsIPresContext* aPresContext,
nsIAtom* aPseudoTag,
nsIFrame* aParentFrame,
nsISupportsArray* aResults) = 0;
// XXX style rule enumerations
virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const = 0;