From 72c29a43f2c683cef08d9d8d4267f1cf1e6b3639 Mon Sep 17 00:00:00 2001 From: "buster%netscape.com" Date: Thu, 17 Dec 1998 22:58:23 +0000 Subject: [PATCH] added nsBorderEdge and nsBorderEdges --- layout/base/public/nsIStyleContext.h | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/layout/base/public/nsIStyleContext.h b/layout/base/public/nsIStyleContext.h index 875e2bad72f6..1fdab678b4d4 100644 --- a/layout/base/public/nsIStyleContext.h +++ b/layout/base/public/nsIStyleContext.h @@ -24,6 +24,7 @@ #include "nsCoord.h" #include "nsMargin.h" #include "nsFont.h" +#include "nsVoidArray.h" #include "nsStyleCoord.h" #include "nsStyleStruct.h" #include "nsStyleConsts.h" @@ -189,6 +190,45 @@ protected: nsStyleTable(void); }; +#define BORDER_PRECEDENT_EQUAL 0 +#define BORDER_PRECEDENT_LOWER 1 +#define BORDER_PRECEDENT_HIGHER 2 + + +/** an encapsulation of border edge info */ +struct nsBorderEdge +{ + nscoord mWidth; + PRUint8 mStyle; + nscolor mColor; + PRUint8 mSide; + + nsBorderEdge(); +}; + +inline nsBorderEdge::nsBorderEdge() +{ + mWidth=0; + mStyle=NS_STYLE_BORDER_STYLE_NONE; + mColor=0; + mSide=NS_SIDE_LEFT; +}; + +/** an encapsulation of a border defined by its edges */ +struct nsBorderEdges +{ + nsVoidArray mEdges[4]; + nsMargin mMaxBorderWidth; + + nsBorderEdges(); +}; + +inline nsBorderEdges::nsBorderEdges() +{ + mMaxBorderWidth.SizeTo(0,0,0,0); +}; + + //---------------------------------------------------------------------- #define NS_ISTYLECONTEXT_IID \